-
Notifications
You must be signed in to change notification settings - Fork 109
Passing the "LongAsMax": "Yes" option to the MS SQL Server ODBC driver? #620
Description
Is it possible to pass additional optional arguments to the ODBC driver in the profiles.yml config?
Please see the following link for the list of connection string keywords:
In particular I'd like to pass the "LongAsMax": "Yes" option to the ODBC driver.
It is not listed in the DBT connection options table (https://docs.getdbt.com/docs/core/connect-data-platform/mssql-setup#reference-of-all-connection-options)
Here is my example profiles.yml file:
my_project:
target: dev
outputs:
dev:
type: sqlserver
driver: 'ODBC Driver 18 for SQL Server'
server: myserver
port: 1433
database: mydb
schema: dbt
user: user1
windows_login: true
trust_cert: true
threads: 4The reason I ask is because I suspect adding the LongAsMax option will fix the problem I'm having with dbt_artifacts.
[Bug]: Database Error ('22001', '[22001] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server] String or binary data would be truncated.
brooklyn-data/dbt_artifacts#521
Where I found the LongAsMax option from here:
https://docs.sqlalchemy.org/en/20/dialects/mssql.html#avoiding-sending-large-string-parameters-as-text-ntext
mkleehammer/pyodbc#835