Is it recommended to save the below data in transform message or under src/main/resources and call it while doing transformation?
product_id | product_name | category_id |
---|---|---|
1 | Pear | 50 |
2 | Banana | 50 |
3 | Orange | 50 |
4 | Apple | 50 |
I currently put it in transform message so wanted to know if that's the good approach.
Storing static data in either the transform message or src/main/resources is perfectly acceptable, as long as you don’t anticipate frequent changes. However, opting for src/main/resources might be more beneficial for other developers, as it allows easier review in case of any modifications. The use of multiple transform messages in the application could make reviewing data stored in transform messages more complex.
If you foresee frequent changes to the data, moving it to property files is recommended. This approach enables you to modify values on the fly without the requirement to rebuild the application.