Hi, I’m new to Looker, and I’m trying to do the following:
- Take a lengthy SQL query that I built and save it as a SQL-based derived table,
- Build a dashboard against the table that I constructed in (1).
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_[table name]. Is my issue that I should be following a similar syntax?
Thanks for whatever help you can provide.
Chris