Skip to content

Create a Dataset Using CSV

This guide walks you through creating a dataset in AIV using CSV (Comma-Separated Values) files. CSV is one of the most commonly used formats for importing and exporting tabular data.

What You’ll Learn

  • What a CSV file is and when to use it
  • How to prepare and upload your CSV file
  • Three ways to create a dataset: simple selection, custom query, or with parameters

What is a CSV File?

A Comma-Separated Values (CSV) file is a plain text format that stores tabular data. Each line represents a row, and values within a row are separated by commas.

CharacteristicDescription
FormatPlain text, human-readable
StructureRows = records, commas = column separators
Use caseData exchange, imports, exports

CSV files are widely supported across applications—spreadsheets, databases, and analytics tools—making them ideal for sharing and migrating structured data.


Prerequisites

Before you begin, complete these steps:

  • Download the sample file: csv.zip
  • Extract the zip archive
  • Upload retail_sales.csv into AIV

Need help uploading? See the Upload guide for instructions.


Video Tutorial

Watch a quick walkthrough of creating a dataset from a CSV file in AIV:


Steps to Create a Dataset Using CSV

Complete Step 1 (Navigate to the Dataset Section) and Step 2 (Create a New Dataset) from the Create Dataset guide, then choose one of the three methods below.

MethodBest for
Method 1: SimpleLoading all CSV data with no changes
Method 2: Custom SQL Query Filtering, selecting columns, or transforming data
Method 3: With Parameters Letting users filter data at runtime (e.g., in dashboards)

Method 1: Simple — Select File and Use Default Data

Use this method when you want to load all data from your CSV file without filtering or custom queries.

Step 1: Select CSV as the Data Source

  1. Choose CSV Files as the data source type.

    Select CSV Files

Step 2: Connection Selection

For details specific to CSV file selection, see Connection Selection for Excel, CSV, and JSON.

  1. Click Select Existing Files.

  2. Search for retail_sales.csv.

  3. Select the file from the list.

    Select CSV Files

  4. Open the Output Columns tab to review column names and data types.

    Simple Output Columns

  5. Open the Preview Results tab to verify the data.

    Simple Preview Results

Step 3: Save Dataset

  1. Click Save.

  2. In the Save Dataset dialog, enter the dataset name (if needed) and choose the target folder.

  3. Click Save Dataset to complete the process.

    Save Dataset

Step 4: View Your Dataset

  1. Go to the Dataset Grid view.

  2. Search for your dataset by name.

  3. Your dataset is now available for use in dashboards, reports, and visualizations.

    Gridview


Method 2: Custom SQL Query

Use this method when you need to filter, transform, or select specific columns using a custom SQL query.

Step 1: Select CSV as the Data Source

Same as Method 1: Simple . Choose CSV Files as the data source type.

Step 2: Connection Selection

  1. Click Select Existing Files.

  2. Search for retail_sales.csv and select it from the list.

  3. Enable SQL Query—the system generates a base query automatically.

    Enable SQL Query

  4. Modify the query to filter columns, add conditions, or transform data as needed.

  5. Open the Output Columns tab to review column names and data types.

  6. Open the Preview Results tab to verify the query output.

Step 3: Save Dataset

Same as Method 1: Save Dataset: Click Save, optionally rename and select the folder in the dialog, then click Save Dataset to confirm.

Step 4: View Your Dataset

Same as Method 1: View Dataset. Go to the Dataset Grid view and search for your dataset. Your dataset is now ready for use in dashboards and reports.


Method 3: With Parameters (Dynamic Filtering)

Use this method when you want users to filter data at runtime (e.g., by store location, date range, or category).

Step 1: Select CSV as the Data Source

Same as Method 1: Simple. Choose CSV Files as the data source type.

Step 2: Connection Selection

Same as Method 2: Connection Selection. Click Select Existing Files, search for retail_sales.csv, select it, and enable SQL Query.

Step 3: Add Parameters to the Query

  1. Update the SQL query to include a parameter placeholder:

    SELECT * FROM retail_sales WHERE StoreLocation IN ({{StoreLocation}})

    Parameter

  2. Click Preview Results.

  3. When prompted, enter a value (for example, Chicago) for the parameter.

  4. Click Submit to view the filtered data.

  5. Verify the output in Preview Results.

    Parameter

Step 4: Save Dataset

Same as Method 1: Save Dataset. Click Save, optionally rename and select the folder in the dialog, then click Save Dataset to confirm.

Step 5: View Your Dataset

Same as Method 1: View Dataset. Go to the Dataset Grid view and search for your dataset. When used in dashboards or reports, users will be prompted to enter parameter values to filter the data dynamically.


Create datasets using other data sources:

Data SourceGuide
Drag & dropCreate Dataset
ExcelDataset using Excel
JSONDataset using JSON
ParquetDataset using Parquet
NoSQLDataset using NoSQL
Flat filesDataset using Flat files
Google BigQueryDataset using Google BigQuery
Google SheetDataset using Google Sheet
External sourcesDataset using External sources
Stored ProcedureDataset using Stored Procedure
ViewDataset using View