Interactive Import

Interactive SQL Import parses your SQL query and transforms it into a set of views, dimensions, and data entities.

📘

Note

When using interactive import to create a draft:

  • we require that the SQL query has at least 1 data entity. If you simply select a set of columns from tables, then you will see an error when you click "Import SQL" that "There is no data entity in your imported SQL."
  • for BigQuery we require tables to be referenced usingproject.dataset.table notation e.g.sandbox-demo-db.thelook_ecommerce.order_items.
  • for BigQuery we only support standard SQL (not Legacy SQL)
  • for BigQuery we require that you add a _TABLE_SUFFIXto your WHERE clause when querying a table with a wildcard. For more on querying wildcard tables with _TABLE_SUFFIX, please see this BigQuery documentation.

Draft Submission

After a SQL query is imported, a draft is generated. You can update the draft by adding a name, description, etc.

In order to submit a draft for review all validation issues have to be resolved. Validation warnings will not prevent draft submission; however, we do recommend investigating the cause of validation warnings.

Once a draft is ready, it can be submitted for review by Builders/Admins. Reviewers can see details for all the views, dimensions, and data entities that will be created (or updated).

If a reviewer approves a draft, then it is validated one final time before it is added to production. If validation fails at this stage, the the draft is sent back to the user who owns the draft to resolve the validation issues; otherwise the new entities are added to production where others can discover and consume them 🎉

If a reviewer rejects a draft, then the draft is sent back to the user who submitted it.

Semantic Validation

Imported SQL queries are compared against existing views and data entities in production. Single Origin deduplicates views and data entities upon import so that you reuse as much as possible.

In the following video, we import a SQL statement that is syntactically different from (but semantically equivalent to) the one in the example above. The Single Origin app can detect the duplication and help us to eliminate it by reusing the existing entities. For more information, please see Semantic Validation.


Did this page help you?