palm sugar commonly referred to as jaggery (or gur) in S. and SE Asia, where it is widely used, is obtained from the sap of various palm trees, notably Arenga pinnata and Borassus flabellifer, the palmyra palm.
The sap is produced when the tree converts its starch reserves into sugar in preparation for the growth of inflorescences at the top of the stem. The procedure for obtaining the sap often involves maltreating the young inflorescence, e.g. by pummelling it with a wooden mallet over a period of several days, to bruise the tissue inside and set the sap flowing. The sap is collected in containers set to catch it as it flows out of incisions in the trunk. The flow may continue for two or three months.