Auto populate yaml data to Oracle DB in LIQUIBASE

I’d like to auto populate yaml data files (like this) to a table called CATALOG using Liqubase. In other words, each time we get a new yaml file, we input it and run my program and finally there will be a new row in CATALOG reflected by that yaml file.

Now I’ve created that table by using the catalog.xml where each column is the key in the yaml file. I assume that the next should be auto-generate an data.xml for the row insertion (because I don’t want to type each value manually).

Since I’m very new to Liquibase, I’m not very confident if I break down those steps correctly. If so, what’s the most efficient way to parse those yaml files to data.xml ? Otherwise, what the next step should be?

Hi @dshuf ,

I was able to make it work using the following changesets. You can refer to these changeset and try to implement like this way:

    <changeSet id="table1" author="dev1">
     <createTable tableName="table1">
        <column name="field_with_yaml_data" type="blob"/>
     </createTable>
    </changeSet> 

    <changeSet id="forum1" author="dev2">
        <insert tableName="table1">	
            <column name="field_with_yaml_data" valueBlobFile="example.yaml"/>
        </insert>
    </changeSet>