dbt ref parser error: syntax error or near .

The problem I’m having

The context of why I’m trying to do this

What I’ve already tried

Some example code or error messages

select weekday(started_at_ts) as weekday, count(*) as total_trips, sum(duration_sec) as total_trip_duration_secs 

from {{ ref('mart__fact_all_bike_trips')}}
group by all; 

When I tried to type {{ ref from the table, it shows an error for parser error: syntax error or near .
I tried look up at the table, its exisiting. I dont know how to solve this problem.

Did you try removing the semicolon from

group by all; 

?

@brunoszdl yes, I tried to remove the semicolon. Is there any other way that you suggest me going for it?

Can you paste here the whole error message?

@brunoszdl Here is the message.
Error: near line 1: Parser Error: syntax error at or near “{”
LINE 5: from {{ ref(‘mart__fact_all_bike_trips’) }}
^

hm. first says the error is at or near . second says error is around the {
Are you using dbt cloud or some other ide ? could there be hidden/unexpected char/unicode in your code? What’s the whole model look like?

I removed the ; and changed commands/refs to work for :snowflake: and dbt jaffle project and this builds fine:

select dayname(order_date) as weekday, count(*) as total_trips, sum(order_id) as total_trip_duration_secs 

from {{ ref('fct_orders')}}
group by all