> ## Documentation Index
> Fetch the complete documentation index at: https://docs.credibledata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedded Data

> Ship CSV and Parquet files inside your packages

You can include CSV or Parquet files directly in your packages. When you publish your package, these data files are published along with your models and become queryable via DuckDB.

Embedding data files in your packages is valuable when you need to:

* **Package sample data** — Example datasets for testing or demos
* **Build standalone models** — Models that don't require database connections
* **Version control data** — Keep data synchronized with model changes in your package

<Note>
  Currently, embedded data files work best for standalone models. Support for querying embedded data alongside database connections (e.g., joining embedded lookup tables with warehouse data) is coming soon.
</Note>

## File Structure

Create a `data/` folder in your package directory and add your files — CSV (`.csv`, with a header row) or Parquet (`.parquet`, more efficient for larger datasets):

```
my-package/
├── publisher.json
├── ecommerce.malloy
└── data/
    ├── country_codes.csv
    ├── product_categories.parquet
    └── exchange_rates.csv
```

## Referencing Embedded Data in Models

Use `duckdb.table()` to reference embedded files in your Malloy models — the same syntax works for CSV and Parquet:

```malloy theme={"languages":{"custom":["/languages/motly.tmGrammar.json","/languages/malloy.tmGrammar.json"]}}
source: country_codes is duckdb.table('data/country_codes.csv') extend {
  dimension:
    country_code is code
    country_name is name
    region is geographic_region
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Publishing" icon="rocket" color="#5C7A93" href="/how-to/modeling/publishing">
    Publish your package — embedded data ships with it
  </Card>

  <Card title="Modeling Overview" icon="wand-magic-sparkles" color="#94793A" href="/how-to/modeling/ai-modeling">
    Build semantic models on top of your embedded data
  </Card>
</CardGroup>
