You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which version and edition of Flyway are you using?
9.22.0
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
command-line
Which database are you using? (Type & version)
BigQuery
Which operating system are you using?
macOS
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
It looks like there's an issue in flyway while parsing the CASE and END CASE block in BigQuery migration.
The test procedure I've defined looks like this
CREATE
OR REPLACE PROCEDURE `${project}.${dataset}.debug_flyway`(testVar STRING)
BEGIN
DECLARE _testVar STRING DEFAULT testVar;
CASE _testVar
WHEN "test_a" THEN
SELECT "test_a";
WHEN "test_b" THEN
SELECT "test_b";
ELSE
SELECT "not found";
END CASE;
END;
However, after running flyway migrate, I've got error message
"exception": "Migration R__debug_flyway.sql failed\n------------------------------------\n
SQL State : HY000\nError Code : 100032\nMessage : [Simba][BigQueryJDBCDriver](100032) Error executing query job. Message: Syntax error: Expected \";\" but got end of script at [14:9]\nLocation : sql/R__debug_flyway.sql (/flyway/sql/R__debug_flyway.sql)\nLine : 1\n
Statement : CREATE \nOR REPLACE PROCEDURE `****.st_datamesh.debug_flyway`(testVar STRING)\nBEGIN\n\nDECLARE _testVar STRING DEFAULT testVar;\n\nCASE _testVar\n WHEN \"test_a\" THEN\n SELECT \"test_a\";\n WHEN \"test_b\" THEN\n SELECT \"test_b\";\n ELSE\n SELECT \"not found\";\nEND CASE\n",
As shown in the exception, it seems like flyway has only parsed the procedure to END CASE; not to the end of the PROCEDURE definition.
Which version and edition of Flyway are you using?
9.22.0
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
command-line
Which database are you using? (Type & version)
BigQuery
Which operating system are you using?
macOS
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
It looks like there's an issue in flyway while parsing the
CASE
andEND CASE
block in BigQuery migration.The test procedure I've defined looks like this
However, after running
flyway migrate
, I've got error messageAs shown in the exception, it seems like flyway has only parsed the procedure to
END CASE;
not to the end of the PROCEDURE definition.tested the stored procedure in BQ
BigQuery doc for
CASE
syntaxhttps://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language#case
full logs:
The text was updated successfully, but these errors were encountered: