You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ return('?' if target.method=='odbc' else '%s') }}
{% endmacro %}
Turns out that didn't work as we hoped, because {{ target.method }} doesn't actually return anything! Why? The method attribute isn't included among its connection keys, exposed to the Jinja context:
This makes bugs like #334 much trickier to debug than they should be. dbt's debug-level logs (logs/dbt.log) show %s for all SQL binding parameters, and we just have to trust that sqlparams is magically catching and converting those characters right as the query is being sent off via pyodbc:
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.
In #250, we added logic to explicitly render the SQL binding character as
?
instead of%s
if the method isodbc
:dbt-spark/dbt/include/spark/macros/materializations/seed.sql
Lines 1 to 3 in fbf9abe
Turns out that didn't work as we hoped, because
{{ target.method }}
doesn't actually return anything! Why? Themethod
attribute isn't included among its connection keys, exposed to the Jinja context:dbt-spark/dbt/adapters/spark/connections.py
Lines 157 to 159 in fbf9abe
This makes bugs like #334 much trickier to debug than they should be. dbt's debug-level logs (
logs/dbt.log
) show%s
for all SQL binding parameters, and we just have to trust thatsqlparams
is magically catching and converting those characters right as the query is being sent off viapyodbc
:dbt-spark/dbt/adapters/spark/connections.py
Lines 280 to 287 in fbf9abe
The text was updated successfully, but these errors were encountered: