Programming Assignment: Assignment 1: Data Modeling with DBT (3.8 Running the Star Schema Model)

Hi - I’ve followed the instructions to the tee right down to exercise 3.8 - Running the Star Schema Model.

Here, when I run dbt run -s star_schema , I get the following error:

What is the issue here becuase the syntax seems to align with the instructions (section3.2.3), being:

star_schema:
  +materialized: table
  +schema: star_schema

Regards,

Matt.

Is line 38 really right? Looks like a comment.

Also, is that YAML … why do people even use that. :grin:

Yes - line 38 is a comment (from the instructions, not mine).

Actually, the line 38 comes from the code output (it’s not comment within the code).

I don’t think line 38 comes from output. If the machine says “syntax error near line 39” and shows the text that it is currently processing, then “Config indicated…” is within the text proper.

Hello @MattP
As @dtonhofer has mentioned, that line is a comment and should have a # sign in the beginning. The correct code in the dbt_project.yml file looks like this:

models:
  classicmodels_modeling:
    # Config indicated by + and applies to all files under models/example/
    star_schema: ...
1 Like

Many thanks, guys. I see where I’ve gone wrong.

Warm regards,

Matt.

Hi - I have another error (with dates). Still in section 3.8. The error is as follows:

I’ve gone through my code and it seems to align with the assignment requests. Can you please advise where I may have made an error?

Regards,

Matt.

Hello @MattP
What do you have in your dates.sql file? It seems like you have some wrong syntax in it. According to the instructions, this file must have a single line of code:

Hi Amir - my code for the dates.sql file, is as follows:

{{ dbt_date.get_date_dimension(‘2003-01-01’, ‘2005-12-31’) }}

I’ve also tried using a select * statement to see if that works. But no success there either.

SELECT * FROM {{ dbt_date.get_date_dimension(‘2003-01-01’, ‘2005-12-31’) }}

Not sure what I’ve missed?

Warm regards,

Matt.

I’ve sorted the issue. I deleted my dates.sql file and redid it. Seemed to work. Still not sure why it wasn’t working in the last round, but works now. Thanks guys for your help (it’s much appreciated).

Regards,

Matt.