Hi All,
I am new to DBT tool. I am setting it up and getting familiar with the tool in my computer.
I have installed all tools/software as instructed in the DBT installation instructions.
I am working on 2 POC’s, 1st is with connectivity to PostgreSQL and 2nd one is using SQL Server Database as a target.
PostgreSQL - working fine and able to import CSV files and create tables and views in the target database.
however, with SQL Server Database, I am getting error as ‘Could not find adapter type sqlserver’.
I have installed the SQL Server custom adapter using the command ‘pip install dbt-sqlserver’ and configured the connection properly in the profile as below.
But it is returning the error ‘Could not find adapter type sqlserver!’ when I run the dbt compile command.
please let me know what I am missing here
target: dev
outputs:
dev:
type: sqlserver
driver: 'ODBC Driver 17 for SQL Server'
server: sqlserver1027
port: 1433
database: dbtwarehouse
schema: dbo
windows_login: True
prod:
type: sqlserver
driver: 'ODBC Driver 17 for SQL Server'
host: sqlserver2017
database: dbtwarehouse
schema: dbo
username: sa
password: sa
Hi, A college of my had problems on Windows. I can check with him, but I think the main reason was that he had different versions of python. Both 32-bit and 64-bit. Dbt was looking for the adapter in the wrong version.
But I will talk to him and get back here.
Edit: By the way, there is a sql server- channel in dbt slack. Might get more / faster help there.
Generally when you get ‘Could not find adapter type sqlserver’ there is a more specific error message as well. Could you please paste the entire output from dbt run?
I have installed 64 bit of Python and all other utilities.
here is the complete out with ‘dbt debug’ command
Running with dbt=0.15.1
dbt version: 0.15.1
python version: 3.7.6
python path: c:\users
r22123(user)
\appdata\local\programs\python\python37\python.exe
os info: Windows-10-10.0.17134-SP0
Using profiles.yml file at C:\Users\r22123(user).dbt\profiles.yml
Error importing adapter: DLL load failed: The specified module could not be found.
Configuration:
profiles.yml file [ERROR invalid]
dbt_project.yml file [OK found and valid]
profile: foo [OK found]
target: dev [OK found]
Profile loading failed for the following reason:
Runtime Error
Credentials in profile “foo”, target “dev” invalid: Runtime Error
Could not find adapter type sqlserver!
Required dependencies:
git [OK found]
please let me know if you need any more information.
There was actually something wrong with my packaging on pypi. So the latest version on pypi did not get installed correctly.
I have published a new version now. So, if you:
pip uninstall dbt-sqlserver
look in your python packages folder that all dbt-sqlserver folders are gone. (something like your-homefolder…python\python37\lib\site-packages on windows). If not, delete them manually.