Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liquibase insert JSON data

Tags:

json

liquibase

What is the best way to insert a big JSON data using Liquibase?

So I have a big JSON data that I need to insert the database using Liquibase, how can I achieve that? I make my changes using xml format.

loadData only supports csv file.

like image 201
Hamid Avatar asked Jul 08 '26 22:07

Hamid


1 Answers

If you can convert json to csv, you can use change-set to import data from csv file.

    <changeSet id="1" author="author1">
        <loadData file="db/changelog/test.csv" separator=";" tableName="table-name">
        </loadData>
    </changeSet>
like image 87
Chamith Avatar answered Jul 12 '26 03:07

Chamith