# GitHub Actions with Liquibase on Snowflake EOF error

**URL:** <https://forum.liquibase.org/t/github-actions-with-liquibase-on-snowflake-eof-error/8252>\
**Category:** Liquibase Development\
**Created:** [May 19, 2023, 2:13pm UTC](https://forum.liquibase.org/t/github-actions-with-liquibase-on-snowflake-eof-error/8252 "2023-05-19T14:13:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![URC1071](https://avatars.discourse-cdn.com/v4/letter/u/c68b51/32.png) [@URC1071](https://forum.liquibase.org/u/URC1071)\
**Post date:** [May 19, 2023, 2:13pm UTC](https://forum.liquibase.org/t/github-actions-with-liquibase-on-snowflake-eof-error/8252/1 "2023-05-19T14:13:38Z")

</div>

All,

I’m looking for help to resolve an error doing deployments with GitHub Actions on Snowflake using the Liquibase docker on linux. (version 4.21.1 #9070 built at 2023-04-13 20:56+0000)

There are a couple of scenarios that I’ve hit, one I found a workaround for the other I haven’t been able to resolve.

There appear to be some code structures that cause an ‘EOF’ error to happen on snowflake with SQL based stored procedures.

ERROR: Reason: liquibase.exception.DatabaseException: SQL compilation error: syntax error line 38 at position 53 unexpected ‘EOF’

Be aware if I run the procedure create operations directly in Snowflake… the error does not happen and the procedures are created and will execute successfully if called in Snowflake. So I am sure the procedures meet Snowflake SnowSQL requirements.

The first… I’ve worked around is as follows. When a variable declaration is between the AS and BEGIN statements in the procedure definition it throws the listed EOF error  
–BREAKS (EOF error)

**proc create definition here**  
AS  
DECLARE  
result boolean;  
header\_line varchar;  
sql\_command varchar;  
BEGIN  
**remainder of procedure here**

However when I move the variables into the body  
–WORKS

**proc create definition here**  
AS  
BEGIN  
– Liquibase workaround: Move Declare statements into main statements  
LET result boolean;  
LET header\_line varchar;  
LET sql\_command varchar;  
**remainder of procedure here**

I also get the same error message on other constructs where I have been unable to find a workaround or reason. Specifically when using the following CTE .

```
with
schema_compare as (
    select A.column_name as ACN, a.ordinal_position as AOP, B.column_name as BCN, b.ordinal_position as BOP
    from table_schema as A 
    full outer join file_schema as B on A.column_name = B.COLUMN_name and A.ordinal_position = B.ordinal_position
)
select CASE WHEN count(*) = 0 THEN TRUE ELSE FALSE END INTO :result from schema_compare where ACN is null or BCN is null;

```

Note: I know that isn’t the most efficient CTE… I’ve also tried several code blocks that do the same thing and all of them appear to have the same issue.

I tried without the CTE and just a query… I tried a Sub-Query… I tried a single row count query and a separate IF block.

If anyone can provide me with guidance on how to resolve this issue it would be very much appriciated.

Thanks,  
Robert

---

<div class="post-metadata">

**Author:** ![URC1071](https://avatars.discourse-cdn.com/v4/letter/u/c68b51/32.png) [@URC1071](https://forum.liquibase.org/u/URC1071)\
**Post date:** [June 14, 2023, 9:45pm UTC](https://forum.liquibase.org/t/github-actions-with-liquibase-on-snowflake-eof-error/8252/2 "2023-06-14T21:45:02Z")

</div>

I had a chat with Snowflake and was sent the following article reference that helped with similar error information I ran into using SnowSQL, but found that it still did not resolve my trouble with Liquibase.

[https://docs.snowflake.com/en/developer-guide/snowflake-scripting/running-examples](https://docs.snowflake.com/en/developer-guide/snowflake-scripting/running-examples)

---

<div class="post-metadata">

**Author:** ![URC1071](https://avatars.discourse-cdn.com/v4/letter/u/c68b51/32.png) [@URC1071](https://forum.liquibase.org/u/URC1071)\
**Post date:** [June 19, 2023, 10:45pm UTC](https://forum.liquibase.org/t/github-actions-with-liquibase-on-snowflake-eof-error/8252/3 "2023-06-19T22:45:40Z")

</div>

Found a fix… by changing the end delimiter the issue was able to be resolved.  
Specifically, I used endDelimiter:“”

> **[endDelimiter SQL attribute](https://docs.liquibase.com/change-types/enddelimiter-sql.html)**
>
> Reference information for the endDelimiter SQL attribute. The endDelimiter SQL attribute is generally used to prevent incomplete SQL statements from being processed when the SQL files contain objects referencing a ';' which Liquibase treats as the...
