dbt-msft / dbt-sqlserver

dbt adapter for SQL Server and Azure SQL
MIT License
204 stars 96 forks source link

"No sample profile found for sqlserver" when running dbt init #419

Open jrschueller opened 1 year ago

jrschueller commented 1 year ago

Describe the bug

I am attempting to initialize a dbt project and create a profiles.yml file. Doing so returns an error of No sample profile found for sqlserver.

Steps To Reproduce

After installing dbt-sqlserver and its dependencies, run dbt init and select the sqlserver option as the database to use for building the profile, e.g.

dbt init

19:54:03  Running with dbt=1.3.4
19:54:04  Setting up your profile.

Which database would you like to use?
[1] sqlserver

(Don't see the one you want? https://docs.getdbt.com/docs/available-adapters)

Enter a number: 1

Expected Behavior

Successfully generate profiles.yml

System Information

Which database are you using dbt with?

The output of dbt --version:

Core:
  - installed: 1.3.4
  - latest:    1.5.1 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - sqlserver: 1.3.2 - Update available!

  At least one plugin is out of date or incompatible with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:

The operating system you're using: Windows 10 Enterprise version 22H2, OS build 19045.2965

The output of python --version:

Python 3.10.11

krismurfi commented 11 months ago

hi @jrschueller. did you ever find a work round for this? i'm trying to run dbt with mssql on a windows laptop and getting the same error. your post is the only example of this issue i can find on the web.

i can't see what the error message No sample profile found for sqlserver is referring to. i wasn't aware that dbt required a sample profile (whatever one of those might be).

trymzet commented 9 months ago

@krismurfi Sorry I'm replying so late, but you mentioned it's hard to google this problem, so let me answer anyway: it's about this file. Basically, the dbt-sqlserver adapter doesn't include a profile_template.yml, so dbt init doesn't know how to create an empty profile for the new project in your ~/.dbt/profiles.yml.

krismurfi commented 9 months ago

thanks @trymzet, the dbt scaffolding can be a bit baffling to begin with, but starting to make sense now. it works really well with on-prem mssql & much better than working with ssis. it's now my go-to integration tool.