Help with snow git execute #1338
Unanswered
himanshumunjal
asked this question in
Q&A
Replies: 1 comment
-
|
Hi @himanshumunjal! Unfortunately the problem is that "/" in branch name is badly parsed by Snowflake CLI. I've created an issue for that (#1512). For now I can suggest a workaround to tag commit / rename branch to one without "/" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm new to snowflake and command-line, so sorry if this is simple thing. I'm trying to execute the below command -
snow git execute @my_REPO/branches/\"feature/DAT-9988-set-up-snowflake-process\"/schema/scripts/deploy.sql --variable SNOWFLAKE_DATABASE_NAME=$SNOWFLAKE_DATABASE_NAME --variable SNOWFLAKE_SCHEMA_NAME=$SNOWFLAKE_SCHEMA_NAME --variable SNOWFLAKE_STAGING_SCHEMA_NAME=$SNOWFLAKE_STAGING_SCHEMA_NAMEAnd it is failing with the below error-
093505 (42601): 01b5c118-060b-1edf-0000-247125b3513e: Files paths in git repositories must specify a scope. For example, a branch name, a tag name, or a valid commit hash. Commit hashes are between 6 and 40 characters long.
When I see the debug logs or query history I see that it is trying to execute
ls '@my_REPO/branches/"feature/'This is not the correct path. The branch name is
"feature/DAT-9988-set-up-snowflake-process" (with quotes). And I'm not able to escape characters due to some reason. If it helps I'm able to run this successfully -
snow git list-files @my_REPO/branches/\"feature/DAT-9988-set-up-snowflake-process\"/schema/scripts/deploy.sql --debugAnd for this I see in the logs -
ls '@my_REPO/branches/"feature/DAT-9988-set-up-snowflake-process"/schema/scripts/deploy.sql'Also this works -
snow sql -q "EXECUTE IMMEDIATE FROM @my_REPO/branches/\"feature/DAT-9988-set-up-snowflake-process\"/schema/scripts/deploy.sql USING (SNOWFLAKE_DATABASE_NAME => ${SNOWFLAKE_DATABASE_NAME}, SNOWFLAKE_SCHEMA_NAME => ${SNOWFLAKE_SCHEMA_NAME}, SNOWFLAKE_STAGING_SCHEMA_NAME => ${SNOWFLAKE_STAGING_SCHEMA_NAME})"Can anyone advise what can I do to fix it? Many thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions