0

I am deploying tables, views, procedures to Snowflake DB using liquibase in gitlab. I am able to deploy tables, views but procedures are not getting deployed even after everything runs successfully.

My master.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
    <include file="tables/changelog.xml" relativeToChangelogFile="true" />
    <include file="views/changelog.xml" relativeToChangelogFile="true" />
    <include file="procedures/proclog.xml" relativeToChangelogFile="true" />
</databaseChangeLog>

And my proclog.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
    <include file="F_EXT_00.sql" relativeToChangelogFile="true" />
    <include file="DITXXP01_00.sql" relativeToChangelogFile="true" />
</databaseChangeLog>

Is there anything else I need to check? The code is correct

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Laster
  • 388
  • 5
  • 18

1 Answers1

0

Does your Snowflake procedure written in JS? if so it may have semicolon as part of your logic/code.

The default behaviour for sql changeset is to use endDelimiter as semicolon (;), you can change this in your sql changesets if required using different endDelimiter attribute. Possibly set it to blank "" in your case.

Please readthrough below documentation for SQL change sets (endDelimiter attribute). https://docs.liquibase.com/concepts/changelogs/sql-format.html

Also have you explored option of using sqlFile in change sets, this is specially to put complex logic outside in sql file but same setting as sql change set applies (I believe).

https://docs.liquibase.com/change-types/sql-file.html

Hope this helps.

Nik Y
  • 1
  • 1