Cook the Base: Place 6 cups of water in a medium pot and bring it to a simmer. Add the drained yellow split peas, grated sweet potatoes, turmeric, and salt. Stir everything together and let it cook until the split peas break down and the sweet potatoes become tender, about 1 hour. Keep an eye on the mixture and add water as needed to prevent it from drying out. By the end, the dhal should have a thick, stew-like consistency, though you can adjust it to your preferred thickness.
Toast the Coconut Flakes: While the dhal is simmering, heat a small, dry skillet over medium-high heat. Add the coconut flakes and toast them, stirring occasionally, until they turn lightly golden. This process should take 2 to 5 minutes. Remove the flakes from the skillet and set them aside in a bowl.
Make the Tarka: In the same skillet, heat the coconut oil over medium-high heat. Once the oil is hot, add the sliced shallots and cook them, stirring frequently, until they are tender and take on a golden-brown color, about 10 minutes. Reduce the heat if needed to prevent burning. Add the grated ginger, mustard seeds, cumin seeds, and cayenne pepper to the skillet and cook for an additional minute, stirring constantly. Remove the skillet from the heat.
Combine the Components: Pour the shallot mixture (tarka) into the pot with the dhal. Stir everything together thoroughly, then taste and adjust the seasoning as needed, adding more salt or spices if desired.
Prepare the Coconut Cream: If using coconut cream, transfer it to a small bowl and whisk it gently to loosen its texture. This will make it easier to serve.
Serve the Dhal: Ladle the dhal into serving bowls. Top each portion with a spoonful of the coconut cream, a sprinkle of the toasted coconut flakes, and fresh cilantro leaves for garnish.