Can I use constants in my sql derived table?

  • 10 June 2022
  • 1 reply

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? 


Best answer by Dawid 10 June 2022, 20:54

View original

This topic has been closed for comments

1 reply

Userlevel 7
Badge +1

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