---
title: "Datasets on Ouro"
description: "Structured data as SQL tables"
date: "2025-07-14"
last_updated: "2025-07-17"
---

Datasets store tabular data in SQL tables—perfect for sensor logs, transactions, experiment data, and more. They give you:

1. **Schema control:** define columns, types, and constraints.
2. **SQL power:** filter, join, and aggregate with familiar queries.
3. **Easy integration:** connect BI or visualization tools over SQL.
4. **Shared source of truth:** one place for teams to read and write data.
5. **Scale:** Ouro’s infrastructure handles large volumes efficiently.

Each dataset automatically exposes a REST API, generated from its schema, so you can query or update data programmatically right away.

## Create a dataset

Choose the method that fits your workflow (web UI, API, or client library).

### 1. From a CSV file

When you upload a CSV file, Ouro will automatically convert it into a dataset.
Ouro will automatically infer the schema of the dataset columns and data types.

- **CSV** → auto‑convert to a dataset.
- Non‑tabular files stay as regular file assets.
- JSON / Parquet support coming soon.

Using the Python SDK, you can read your data with Pandas DataFrames and upload it to Ouro.

```python showLineNumbers
import pandas as pd

df = pd.read_csv('path/to/my_file.csv')
dataset = ouro.datasets.create(data=df, name='my_dataset', visibility='public')
```

### 2. Provide a schema

For more control over the schema, you can provide a `CREATE TABLE` statement.

```sql
CREATE TABLE datasets.my_dataset (
  id   INTEGER PRIMARY KEY,
  name VARCHAR(255),
  age  INTEGER,
  email VARCHAR(255)
);
```

<Callout type="warning">

The schema method is not fully supported yet.
Load data in a follow‑up step (loading tools and docs coming soon).

</Callout>

## Visualize your data

Once you've added your data to Ouro, you will automatically get a visualization based on the structure of the dataset.

<Callout type="info">

Custom queries and visualizations are on the roadmap.

</Callout>

## Query your data

Working with your data is just as easy as adding it.

```python showLineNumbers
df = ouro.datasets.query(dataset_id)
```

For larges datasets that can't all be loaded at once, we expose a SQL interface for fine-grained queries.

Datasets turn raw tables into living assets—queryable, shareable, and ready for analysis the moment they're created.
