If it’s a requirement to dynamically generate your data and then load it, one way to do this would be to dynamically create a .csv file that has all the inserts you need and read that into your changeset using a loadData changeset type.
Thanks Mike for the Soln. Is there any way to generate the .csv file dynamically through the checked-in changesets? Does Liquibase provides any way to generate .csv files?
Hi @arsh_liquibase Liquibase will dynamically generate a .csv file when you pull data from a database. Liquibase does not dynamically generate data. I would think there are many tools that can dynamically generate a csv file. Once you have that you can feed the file to the loaddata changeset type. Is this a requirement or a design decision to build it this way?
This is a requirement as we need to insert the same scripts for two different entities with Entity ID as the only difference. This will become more complex if we go with CSV way. We might have to create CSV files for each table and then insert using the liquibase engine.
Is there any way other than .CSV format.
I can think of one way where i can loop through entity ID list for each change set.