Can I use constants in my sql derived table?

JC_U
Participant I

Hi all, 

I’d like to work with constants in my manifest file however I can’t seem to get it to work. Am I able to use constant in my sql derived table? 

My manifest file: 

constant: some_date {

    value: “2022-06-10” 

I want this constant so I can use it across different views. 

my sql derived table: 
sql: some_query from some_table WHERE date = @{some_date}

… I’ve also tried in quotes:

WHERE date = “@{some_date}” 

But this isn’t working. I am getting an error of: “2022-06-10” does not exist in some_table. Any one know what;’s going on? 

Solved Solved
0 1 473
1 ACCEPTED SOLUTION

Dawid
Participant V

Could be that the double quotes make it look like a reference to a column, but I’m not sure what dialect you’re using. 

What you’re trying to do is totally legit. With a date try perhaps this:

WHERE date = DATE(“@{some_date}”) or even with single quotes

View solution in original post

1 REPLY 1

Dawid
Participant V

Could be that the double quotes make it look like a reference to a column, but I’m not sure what dialect you’re using. 

What you’re trying to do is totally legit. With a date try perhaps this:

WHERE date = DATE(“@{some_date}”) or even with single quotes

Top Labels in this Space
Top Solution Authors