-
Notifications
You must be signed in to change notification settings - Fork 179
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
[Feature] Implement EXTERNAL_ACCESS_INTEGRATIONS
and secrets in submit_python_job
#925
Comments
I might be able to solve this in https://github.com/dbt-labs/dbt-snowflake/blob/main/dbt/adapters/snowflake/impl.py#L200 but I'm unable to open up a PR. |
If you want me to I can open up a new feature request and get started on this? |
@Lindblomsebastian sure, you are welcome to open a FR and we can consider it for inclusion in a future version. As a shorter term workaround, you may just want to use something like a "Raw SQL materialization" as a workaround...effectively putting in the entire python SP code into the body of a model: https://github.com/randypitcherii/dbt_workspace/blob/production/dbt/macros/demos/materializations/raw_sql/raw_sql.sql |
Cool, thanks! I opened a FR: #927. I can take a stab at implementing it too. |
Thanks for diving into this @Lindblomsebastian ! Being able to add But since it's not something we support yet, I'm going to recategorize this as a feature request (rather than a bug) and consolidate #925 and #927 into a single issue. |
EXTERNAL_ACCESS_INTEGRATIONS
and secrets in submit_python_job
… & secrets (Snowpark concept) (#5262) ## What are you changing in this pull request and why? dbt-labs/dbt-snowflake#925 dbt-labs/dbt-snowflake#955 ## Checklist Wait until PR is merged
Is this your first time submitting a feature request?
Describe the feature
Propagate
external_access_integration
andsecrets
from the dbt config into the procedure being created when submitting a python model.Describe alternatives you've considered
Extracting
external_access_integration
andsecrets
from the dbt config and propagate it to thecommon_procedure_call
indbt-snowflake/dbt/adapters/snowflake/impl.py
Line 225 in f0cbea2
Who will this benefit?
This will solve #925
Anyone that wants to use Snowflake’s external access together with secrets to query external APIs within dbt Python models.
Examples
Are you interested in contributing this feature?
Yes
Anything else?
See current vs. expected behavior below.
Current Behavior
EXTERNAL_ACCESS_INTEGRATION
andSECRETS
not being propagated into the temporary procedure when running a dbt python model.With a very simple python model like:
with
model.yml
like:DBT generates this from this model:
Expected Behavior
I would expect the generated procedure to look like:
containing the
EXTERNAL_ACCESS_INTEGRATION=(TEST_EXTERNAL_ACCESS_INTEGRATION)
andSECRETS = ('secret_key_1' = secret_name_1
parameter so that the function returns "200".Steps To Reproduce
defined
model.yml
Run the DBT python model:
Relevant log output
Environment
Additional Context
This is very similar to the post https://discourse.getdbt.com/t/dbt-python-model-external-access-integrations-and-secrets/11066
The text was updated successfully, but these errors were encountered: