Skip to main content

Views

A view is a transformed view of one or more tables. Views are created by transforms, which are either SQL queries or LLM prompts.

SQL view

An SQL view is a table view created by running an SQL query against a table.

Every table in Shaped can be consistently transformed with an SQL query.

You can use these transformations to:

  • Filter or aggregate source tables
  • Join multiple datasets
  • Create derived features from existing columns
  • Reshape data structures such as JSON

AI view

An AI view is created by running an LLM prompt against the records in a dataset. They take columns from a source dataset, apply an LLM with a prompt, and output new columns with enriched information.

Use them specifically to enrich data that will power semantic search.

Transform chaining

You can chain multiple transformations to get your dataset to the desired format. Each transformation will return a view, which can be used in the next transform.

For example, for a user_profiles table:

  1. SQL transform: Split full name into first and last name
  2. AI transform: Find the user's country from their city name