Cannot create a derived table using SQL

Hi, I’m new to Looker, and I’m trying to do the following: 

  1.  Take a lengthy SQL query that I built and save it as a SQL-based derived table, 
  2.  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_

.  Is my issue that I should be following a similar syntax?  

Thanks for whatever help you can provide. 

Chris 

0 2 328
2 REPLIES 2
Top Labels in this Space
Top Solution Authors