Create a Dataset Using View
This guide walks you through creating a dataset in AIV using a database view. Views provide a simple way to expose filtered or transformed data from your database without writing complex queries.
What You’ll Learn
- What a view is and when to use it
- How to create a dataset from a database view
- How to preview, save, and view your dataset
What is a View?
A view is a database object that holds no data itself. Its contents are based on a base table or query, and it appears like a table with rows and columns. Views can hide columns from users by granting access to the view rather than the underlying table.
| Characteristic | Description |
|---|---|
| Format | Virtual table based on SQL query |
| Structure | Rows and columns like a real table |
| Use case | Security, simplified access, data abstraction |
Prerequisites
Before you begin:
- Have access to MySQL Workbench (or another database client) if you need to create or edit the view
- Have the database connection for the target database (e.g., SampleDB) configured in AIV
- Know the view name and the output columns it returns
- Ensure the view already exists in the database you will select
Steps to Create a Dataset Using View
Complete Step 1 (Navigate to the Dataset Section), Step 2 (Create a New Dataset), and Step 3 (Define Dataset Details) from the Create Dataset guide.
Step 1: Select Database Connection
Select the database connection that hosts your view (for example, SampleDB). Use the search bar to filter if you have many connections.
For details on selecting or creating database connections, see Database and Connected Sources.
Step 2: Select the View
- In the Dataset Editor, locate the Views section in the left panel (Database Explorer).
- Expand Views to see available views.
- Drag and drop the view from the left panel to the right code panel.
- The system automatically generates the view query in the query editor.
Step 3: Configure Output Columns
- Open the Output Columns tab.
- Review the columns returned by the view.
- Optionally rename columns, adjust data types, apply formats, or disable columns not needed.
For detailed options, see Output Columns Tab Terminology.
Step 4: Preview the Result
- Open the Preview tab (or click Preview Result).
- Verify the result grid: correct rows, required columns, and expected data types.
For detailed options, see Preview Tab Terminology.
Step 5: Save Dataset
- Click Save.
- In the Save Dataset dialog, optionally rename the dataset and select the destination folder.
- Click Save Dataset (or Create) to confirm.
Step 6: View Your Dataset
- Go to the Dataset Grid view.
- Search for your dataset by name.
- Your dataset is now available for use in dashboards, reports, and visualizations.
Related Guides
Explore other ways to create datasets in AIV:
| Data Source | Guide |
|---|---|
| Drag & drop | Create Dataset |
| Excel | Dataset using Excel |
| CSV | Dataset using CSV |
| JSON | Dataset using JSON |
| Parquet | Dataset using Parquet |
| NoSQL | Dataset using NoSQL |
| Flat files | Dataset using Flat files |
| Google BigQuery | Dataset using Google BigQuery |
| Google Sheet | Dataset using Google Sheet |
| External sources | Dataset using External sources |
| Stored Procedure | Dataset using Stored Procedure |