Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state that snowflake_database var does not alter where change history table is created #153

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

RichieBzzzt
Copy link

Minor alteration to the README to make it clear that using a two part name in the CHANGE_HISTORY_TABLE argument will result in the METADATA database being used to store the change history table, and not the value in the SNOWFLAKE_DATABASE argument.

@RichieBzzzt
Copy link
Author

Happy to alter the wording on this. I assumed that the snowflake_database var would set the database being used in the context of the connection, as I'm used to SMO and ADO.NET, and probably other people used to those libraries would make the same assumption.

Copy link
Collaborator

@sfc-gh-tmathew sfc-gh-tmathew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RichieBzzzt Please make the correction and resubmit for review.

@@ -171,7 +171,7 @@ The Jinja autoescaping feature is disabled in schemachange, this feature in Jinj

## Change History Table

schemachange records all applied changes scripts to the change history table. By default schemachange will attempt to log all activities to the `METADATA.SCHEMACHANGE.CHANGE_HISTORY` table. The name and location of the change history table can be overriden by using the `-c` (or `--change-history-table`) parameter. The value passed to the parameter can have a one, two, or three part name (e.g. "TABLE_NAME", or "SCHEMA_NAME.TABLE_NAME", or "DATABASE_NAME.SCHEMA_NAME.TABLE_NAME"). This can be used to support multiple environments (dev, test, prod) or multiple subject areas within the same Snowflake account. By default schemachange will not try to create the change history table, and will fail if the table does not exist.
schemachange records all applied changes scripts to the change history table. By default schemachange will attempt to log all activities to the `METADATA.SCHEMACHANGE.CHANGE_HISTORY` table. The name and location of the change history table can be overriden by using the `-c` (or `--change-history-table`) parameter. The value passed to the parameter can have a one, two, or three part name (e.g. "TABLE_NAME", or "SCHEMA_NAME.TABLE_NAME", or "DATABASE_NAME.SCHEMA_NAME.TABLE_NAME"). This can be used to support multiple environments (dev, test, prod) or multiple subject areas within the same Snowflake account. If you use the two part name then it will attempt to create the change history table to the 'METADATA' table, and not the database set in the ```SNOWFLAKE_DATABASE``` variable. By default schemachange will not try to create the change history table, and will fail if the table does not exist.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

METADATA Database instead of table.

@sfc-gh-tmathew sfc-gh-tmathew self-assigned this Nov 2, 2023
@sfc-gh-tmathew sfc-gh-tmathew added the dependencies Pull requests that update a dependency file label Nov 2, 2023
@sfc-gh-tmathew sfc-gh-tmathew changed the base branch from master to dev November 17, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants