In a pot over medium heat, heat oil. Add onions, garlic, and ginger. Cook, stirring regularly, until aromatic.
Add tomatoes and cook, mashing with until softened.
Add chicken and cook, turning occasionally, until color changes and juices run clear.
Add fish sauce and continue to cook, stirring occasionally, for about 1 to 2 minutes.
Add water and bring to a boil.
Lower heat, cover, and simmer until chicken is cooked through.
Add long beans and pickled tamarind leaves or fresh tamarind leaves, and cook until long beans are tender yet crisp.
Add tamarind base powder or tamarind pulp, stirring to combine. Continue to cook for about 2 to 3 minutes.
Season with salt to taste. Serve hot.