Can I create view files from db views?

Knowledge Drop

Last tested: Nov 24, 2020
 

Yes. However, you may have to do it SQL Runner because the generator won't find them in all cases. Specifically,

  1. In SQL Runner, run SELECT * FROM <table>
  2. Click the gear in the top right and choose "Add to Project".

The generator looks at the database's information schema, which seldom contains view information. This is also why views many times don't show up on the left hand side of SQL Runner.

Some dialects can find Views, however. Snowflake views, for example, do show up in SQL Runner and Create View from Table. If you aren’t able to create the view file or see the view files in SQL Runner but you are able to do so in Snowflake, check to see if their permissions in Looker are the same as those in Snowflake. In other words, try to view the view files as the Looker user in Snowflake.

This content is subject to limited support.                

Version history
Last update:
‎05-07-2021 09:12 AM
Updated by: