Title: Flyway:Environment Placeholder is not recognizing
Tags: snowflake-cloud-data-platform;flyway
Question: Have downloaded the flyway version flyway-7.14.0 command-line tar file in MAC
Unable to read the value from the FLYWAY_PLACEHOLDERS_RETSCHEMA, tried with both $ and @
I have given in the script as below
export FLYWAY_PLACEHOLDERS_RETSCHEMA=DEV_RET
/path/flyway/flyway-7.14.0/flyway migrate -configFiles=config/flyway_dev.conf -password='****'
The V1.0.0__init.sql file is as below
CREATE SCHEMA IF NOT EXISTS @{RETSSCHEMA};
USE SCHEMA @{RETSCHEMA};
But it threw an error
Successfully validated 51 migrations (execution time 00:19.616s)
Current version of schema &quot;DEV_RET&quot;: << Empty Schema &gt;&gt;
Migrating schema &quot;DEV_RET&quot; to version &quot;1.0.0 - init&quot;
ERROR: Migration of schema &quot;DEV_RET&quot; to version &quot;1.0.0 - init&quot; failed! Please restore backups and roll back database and code!
ERROR: Migration V1.0.0__init.sql failed
---------------------------------
SQL State  : 42000
Error Code : 1003
Message    : SQL compilation error:
syntax error line 1 at position 28 unexpected '@{RETSCHEMA}'.
Location   : sql/flyway/versions/V1.0.0__init.sql (/Users/work/sql/flyway/versions/V1.0.0__init.sql)
Line       : 1
Statement  : CREATE SCHEMA IF NOT EXISTS @{RETSCHEMA}
Comment: Is this issue related to Snowflake or any of it's drivers?

Comment: looks like a typo: in you variable it's named export RETSCHEMA and in your file RETSSCHEMA



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2021:00:08/23/21', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<snowflake-cloud-data-platform><flyway>', 'Title': 'Flyway:Environment Placeholder is not recognizing', 'ViewCount': 74, 'id': 68898329, 'user_AboutMe': '', 'user_AccountId': 6728945.0, 'user_DisplayName': 'Karthik', 'user_Reputation': 175.0, 'user_Views': 58.0, 'user_id': 5185997.0}}