Pressure cook the soaked dal in 1 1/2 cups water for 4-5 whistles. Add salt and whisk well. Adjust water accordingly depending on the consistency desired.
Heat oil in a pan and temper with mustard seeds and cumin seeds. After it stops spluttering add the asafoetida, turmeric powder, curry leaves and green chilies. Saute for a few seconds.
Add the coconut along with the sugar and goda masala. Fry for a minute on a medium flame. Then add the tomatoes and the tamarind water. Simmer till the tomatoes are mashed.