Build Customer Seed Database

I am a newbee - and I am following : Quickstart for dbt Core from a manual install | dbt Developer Hub (getdbt.com)

We are an on-premise operation and need to use dbt Core, we have the SQL server adaptor and it all seems to be hanging together nicely - up until step 8.

I have got to step 8 and I am unsure how to get the customer database installed. I have a database connection that is the owner of the database and the scripts my_first_dbt_model.sql and my_second_dbt_model.sql run fine and return results. So I can create tables, read data - so all pretty positive.

The installation was completed by our Admins due to security requirements etc. I have tried to run dbt seed, but get the following :

PS C:\Users\Andrew Smith\jaffle_shop> dbt seed
05:35:07 Running with dbt=1.7.11
05:35:08 Registered adapter: sqlserver=1.7.4
05:35:09 Found 2 models, 4 tests, 0 sources, 0 exposures, 0 metrics, 455 macros, 0 groups, 0 semantic models
05:35:09
05:35:09 Nothing to do. Try checking your model configs and model specification args
05:35:09
05:35:09 Completed successfully
05:35:09
05:35:09 Done. PASS=0 WARN=0 ERROR=0 SKIP=0 TOTAL=0
PS C:\Users\Andrew Smith\jaffle_shop>

Clearly it cannot find the sample database to seed. Could someone please provide me with the some simple steps on how to install the Customer sample tables and populate them into an on premise SQL Server. I must be missing something simple - are there some checks I should do to see if I have everything I need in the C:\Users\Andrew Smith\jaffle_shop folder, and if not, how I get it in there and make dbt seed work. Assuming dbt seed should just find the right file and begin the population.

Thanks (this is probably pretty simple - but quite frustrating at this end).

Andrew

Does anyone know where to find the seed files. From what I have read all I need to do is copy the csv files into my seed folder and run dbt seed. Where can I find the files for Customers, Orders etc

Do you have a folder like this?

csv files inside /seeds folder

Hi

Yes had a seeds folder - but nothing in it.

Found this : jaffle_shop/seeds at main · dbt-labs/jaffle_shop (github.com)

Downloaded the 3 files - changed names and added to seeds folders as .csv files

ran dbt seed

and then this script and it all worked :

with customers as (

select
    id as customer_id,
    first_name,
    last_name

from dbo.customers

),

orders as (

select
    id as order_id,
    user_id as customer_id,
    order_date,
    status

from dbo.orders

),

customer_orders as (

select
    customer_id,

    min(order_date) as first_order_date,
    max(order_date) as most_recent_order_date,
    count(order_id) as number_of_orders

from orders

group by customer_id

),

final as (

select
    customers.customer_id,
    customers.first_name,
    customers.last_name,
    customer_orders.first_order_date,
    customer_orders.most_recent_order_date,
    coalesce(customer_orders.number_of_orders, 0) as number_of_orders

from customers

left join customer_orders ON customers.customer_id = customer_orders.customer_id

)

select * from final

Yeah, seeds are csv files inside your seeds folder

You can run them using ‘dbt seed’, and dbt creates tables in your database using the seed name and data