Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Query INFORMATION SCHEMA before running CREATE IF NOT EXISTS #39

Conversation

anton-chekanov
Copy link
Contributor

Description & motivation

Running CREATE IF NOT EXISTS still requires CREATE SCHEMA privileges, at least in Snowflake. We can work around it by looking up if meta schema exists in INFORMATION SCHEMA.

Checklist

  • I have verified that these changes work locally
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models (and macros if applicable)

Copy link
Contributor

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

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

Thanks @anton-chekanov! This feels reasonable to me.

@jtcohen6 jtcohen6 merged commit 0d7b934 into dbt-labs:master Jul 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants