We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description Adds an option clause macro which allows for adding options to a table via the config:
#171
But Can Not be used, variable in config options
1、create test model/test.sql {{ config( materialized='table', file_format='jdbc', options={ 'dbtable': 'my_table', 'url': 'jdbc:sqlserver://localhost:1433;databaseName=database;', 'user': 'user', 'password': '{{ var("password"}}' } ) }} select 1
2、Execute command dbt run --select pg --vars '{"password":"password"}'
The text was updated successfully, but these errors were encountered:
hi @shenpeiheng, thanks for reporting! apologies for the unusually slow triage time on this one.
some initial things to try would be removing the {{ ... }}, i.e. adjusting the password line to:
{{ ... }}
'password': var('password')
this would be because you're already in a Jinja context.
can you let us know if that works? also going to tag @jtcohen6 as he might know better what's going on here
Sorry, something went wrong.
No branches or pull requests
Description
Adds an option clause macro which allows for adding options to a table via the config:
#171
But Can Not be used, variable in config options
1、create test model/test.sql
{{
config(
materialized='table',
file_format='jdbc',
options={
'dbtable': 'my_table',
'url': 'jdbc:sqlserver://localhost:1433;databaseName=database;',
'user': 'user',
'password': '{{ var("password"}}'
}
)
}}
select 1
2、Execute command
dbt run --select pg --vars '{"password":"password"}'
The text was updated successfully, but these errors were encountered: