SODA: Connect SQL Server without Password
When you do your first steps using soda, it is possible you want to connect to an SQL Server database. In that case you can create an specific user and give him the proper rights I wrote about that in the following post: Connect Soda to SQL Server. But, Is it possible to use the windows authentication, so you don’t have to use a password. In the official documentation of SODA: Link to the official Documentation you can find the following for trusted_connection:
The default value is false. Set to true if using Active Directory authentication.
Soda official Documentation
So, if you set the “Trusted connection” to True It won’t be necessary to create the user. The YML file should be similar to this one:
data_source adventureworks:
type: sqlserver
host: localhost
port: '1433'
username: notmatterwhatyouwrite
password: notmatterwhatyouwrite
database: AdventureWorksLT2019
schema: SalesLT
trusted_connection: true
trust_server_certificate: false
driver: 'ODBC Driver 17 for SQL Server'
And the result of that is a valid connection:
soda test-connection -d adventureworks -c configuration.yml -V