Hi, I’m new to Looker, and I’m trying to do the following:
When I try to complete (1), I’m encountering the following error: ERROR: syntax error at or near "view" Position: 116. Here is my script:
view: [my table name] {
derived_table: {
sql:
[My long query that begins using a WITH clause]
;;
}
}
Should I be running this query in a special environment or using a different methodology? I’m noticing that several other NDTs created by someone who used to work at my company are named lr$lw[long alpha-numeric string]_ndt_
Hello there!,
I think the problem here is with the WITH clause that’s being used at the beginning of the query, as it will create nested WITH statements, as described in the documentation (on the “avoid using common table expressions (CTEs)” part).
You can use the recommendation suggested there, which is described a bit more here.
Thanks, Ricardo - I got this to work. Appreciate help.