Views
Learn what views are, how to create them and use them for tasks.
Views provide a flexible way to prepare data inputs that match your task requirements. A view is a saved SQL query on top tables in your workspace. By creating a view you can combine, slice, sort, and filter data from multiple tables in a way that aligns with your task's expected schema.
While tables maintain rigid structures to ensure consistent data imports, views give you the freedom to reshape and select exactly the data your task needs.
Views are dynamic and are updated as the data in the underlying tables changes. This means that when new data is added or removed from the table this is visible in the view.
Example
In the example below you can see how a view can combine data from different tables.
Creating a view
Views are created through the API, learn more in /table. This endpoint is used to create both tables and views, to create a view specify kind as VIEW.
Unlike tables, views can be customized freely after their creation. Updating a view can be done through the API. Learn more in /tables.
Using views for tasks
When creating a view for a specific task make sure to include the columns required. To understand requirements for a task see the API reference documentation, learn more in /task/create.
Example
You want to analyze the quality of data you intend to import to Cradle using the task Analyze Data. You see that the following columns are required in the dataset.
You have two tables, one for sequence data and one for assay data. To create a view including all required column types for the task you run a SQL query that combines the data from both tables.