New Webinar: Govern roles, shares, and data movement in Snowflake

Learn how to govern Snowflake roles, shares, and data movement without slowing delivery. Join our live webinar on controlling drift, permissions, and audit readiness.

Use UUID and load data

Last updated: September 2, 2025

Liquibase uses Universally Unique Identifiers (UUID)s to define tables so they are more easily searchable.

How to use UUID and load data

1

Define a table

For example, this changelog creates two tables:projectandproject_objectives. It then uses theloadDataChange Type to load data into theproject_objectivestable:

<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
  xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
  xmlns:secure="http://www.liquibase.org/xml/ns/secure"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
        http://www.liquibase.org/xml/ns/dbchangelog-ext
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
        http://www.liquibase.org/xml/ns/secure
        http://www.liquibase.org/xml/ns/secure/liquibase-secure-latest.xsd">
  <changeSet id="1" author="mike">
    <createTable tableName="project">
      <column name="id" type="uuid">
        <constraints primaryKey="true" nullable="false"/>
      </column>
    </createTable>
  </changeSet>
  <changeSet id="2" author="mike">
    <createTable tableName="project_objectives">
      <column name="objectives_id" type="uuid">
        <constraints nullable="false"/>
      </column>
      <column name="project_id" type="uuid">
        <constraints nullable="false"/>
      </column>
    </createTable>
    <addPrimaryKey columnNames="project_id, objectives_id" tableName="project_objectives"/>
  </changeSet>
  <changeSet id="2-data" author="mike" context="test">
    <loadData
				file="test-data/project_objectives.csv"
				separator=";"
				tableName="project_objectives">
      <column name="objectives_id" type="uuid"/>
      <column name="project_id" type="uuid"/>
    </loadData>
  </changeSet>
</databaseChangeLog>
2

Add a CSV for Liquibase to insert

Add a CSV for Liquibase to insert with the same name as theloadDatafile above. In this example, it isproject_objectives.csvin thetest-datafolder:

objectives_id;project_id
8d1208fc-f401-496c-9cb8-483fef121234;ea5bc0ab-6ccf-4791-a048-694a5be1d309
8d1208fc-f401-496c-9cb8-483fef121234;1a8aebee-2061-4220-99ce-ddaf2b22d23f
cce54793-00b8-4830-8f3c-e4cb97b8fb70;1bc59ddb-8d4d-41d0-9c9a-34e837de5678
234c2416-e7f2-47bf-afdc-03645b3a98ab;1bc59ddb-8d4d-41d0-9c9a-34e837de5678
234c2416-e7f2-47bf-afdc-03645b3a98ab;1482cc79-fd01-42e4-b5a1-a7f0db546d00
12349c78-454a-4167-9a1e-8e853a4cf2f5;072e217f-76b3-4cae-b3bd-f7c71a8e0003
1234bf02-0ffa-4b52-b22f-a10e76e31cb5;98f275cd-934d-42cd-91e4-fa0acd7dc5eb
e6b920b7-4ac4-4b62-aea7-36f75e3ad610;dddd728e-fd2c-4a1c-8a10-ffd84ed1603c
ef8614c9-f4d7-4b56-9aaa-088cbe9f7e71;dddd728e-fd2c-4a1c-8a10-ffd84ed1603c
678abcde-898a-4cd9-8aae-99a1943b2ebf;dddd728e-fd2c-4a1c-8a10-ffd84ed1603c
3

Run liquibase update to create the table and insert the data.