SQL cell inconsistency on Python date parameter

This may or may not be a bug, but I can’t figure it out. This is what my variable viewer shows for firstday and today:
firstday = {str} ‘2023-01-01’
today = {str} ‘2023-01-23’

Both strings were generated by Python’s date.isoformat() method.

I then attempt to use them in a SQL cell as

WHERE
A.JEDate > {firstday}
AND A.JEDate < {today}
AND …

Above query returns 0 records. If I explicitly type firstday as a string literal…

     WHERE
     A.JEDate > '2023-01-01'
     AND A.JEDate < {today}
     AND ...

I get the populated query I’m expecting. For whatever reason I can’t get the first date to work as a parameter. The today variable works fine. I’ll be embarrassed if it’s something obvious. I couldn’t find any info in the documentation that might explain. Thanks.

Hello @jaclynn, thank you for the report!

Which Datalore version are you using?

There is indeed a bug with multiple interpolated variables in on-premises version, it’s fixed in the cloud and will be fixed in the next on-premises version.

It’s the enterprise on-prem docker version, 2022.3. Thanks

1 Like