dbt-labs / dbt-external-tables

dbt macros to stage external sources
https://hub.getdbt.com/dbt-labs/dbt_external_tables/latest/
Apache License 2.0
286 stars 115 forks source link

Snowflake Stage Creation #301

Open T-Dunlap opened 2 months ago

T-Dunlap commented 2 months ago

Describe the feature

We'd like the ability to (optionally) create snowflake stages as a part of the dbt-external-tables package. Ideally, we'd specify in yml the specifics about the stage, and then be able to call the stage creation as an argument in the stage_external_sources macro.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Other solutions within dbt are to add the stage creation code as a macro or within an on-run-start hook. While this may accomplish the same end result, it would be ideal to specify the stage right alongside the external tables so that the logic is not de-coupled.

Additional context

Is this feature database-specific? Which database(s) is/are relevant? Please include any other relevant context here.

As far as I know, Stage creation is specific to the Snowflake external tables.

Who will this benefit?

What kind of use case will this feature be useful for? Please be specific and provide examples, this will help us prioritize properly.

This will benefit all teams who are using snowflake external tables, as the stage creation is the first step in order to create external tables. Storing this as code within your repo allows it to be managed and version controlled alongside your external tables.