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

# Create an artifact

> Produce documentation and DDL from your models.

## What you're building

Artifacts are how Snap Data Studio delivers curated context to the people, agents, and systems that use it. You capture business meaning in [conceptual](/guides/create-conceptual-model), [logical, and physical](/guides/create-logical-physical-model) models; artifacts turn that approved context into consumable outputs — human-readable documentation, database DDL, and other open-standard files downstream consumers can retrieve when they need them.

Snap Data Studio remains the place to author, review, and govern what the business means. Artifacts are the delivery layer: a governed source of truth so coding agents, platforms, catalogs, and teams start from the same context instead of rediscovering or reinterpreting it for each task.

## What you can create

| Artifact      | Format   | When to use                                                                                                                                                                   |
| ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Documentation | Markdown | Explain the model for people: scope, definitions, design decisions, and how tables map to business meaning.                                                                   |
| DDL           | SQL      | Produce warehouse-ready `CREATE` scripts from a [physical diagram](/guides/create-logical-physical-model) that has a platform warehouse configured (Snowflake or Databricks). |

Each artifact type has its own entry point — see [Docs](#docs) and [DDL](#ddl) below. Some flows also create documentation for you: [Generate Model](/guides/create-logical-physical-model#what-gets-created) adds **AI-Generated Documentation** and, when applicable, **Column Mappings**. Reverse engineering and warehouse conversion can add reports as well.

## Docs

Create a blank markdown document from the diagram, write with Copilot, or use docs that generation already produced.

### Add documentation

1. Open **Diagrams** in the project sidebar.
2. Hover the target diagram and open its ⋯ menu.
3. Click **Add documentation**.

Snap Data Studio opens an **Untitled Documentation** tab nested under that diagram, with a starter markdown body. Use **Edit** and **View** to switch modes. **Back to model** returns to the parent diagram. Edits autosave.

From the documentation item’s ⋯ menu you can **Rename**, **Duplicate**, or **Delete** it.

### Write docs with Copilot

With the diagram open, use **AI Copilot** in Agent mode and ask for documentation. Copilot stages a markdown draft (it does not save until you accept). Review the changes, edit if needed, then **Keep** / **Accept** to persist or **Revert** / **Reject** to discard.

### Docs from Generate Model

When you [generate a Kimball or Data Vault model](/guides/create-logical-physical-model#generate-model), the new diagram includes **AI-Generated Documentation** and often **Column Mappings**. Open those children from the Diagrams drawer to review or edit them like any other documentation artifact.

## DDL

Forward engineering turns a saved physical diagram into a SQL script for its configured warehouse. The script is stored as a DDL artifact under the diagram; Snap Data Studio does not run it against the warehouse.

### Forward engineer

1. Open **Diagrams** in the project sidebar.
2. Hover the target diagram and open its ⋯ menu.
3. Click **Forward engineer**.
4. In the **Forward Engineer** modal, confirm the database type for the diagram’s warehouse (**Snowflake** or **Databricks**).
5. Click **Generate DDL**.

While generation runs you see progress (and can **Cancel generation**). On success, a code editor tab opens under the diagram with a `.sql` file named from the diagram and dialect (for example `Sales_Model_snowflake.sql`). The SQL is editable and autosaves.

### What the script includes

* Table and column definitions, primary keys, unique constraints, nullability, and comments
* Foreign keys inline where the dialect and model allow
* **Snowflake:** `CREATE OR ALTER TABLE`
* **Databricks:** `CREATE TABLE`

### Prerequisites

* The diagram must have a **warehouse** configured in [physical location settings](/guides/create-logical-physical-model#canvas-basics) so physical mode is available
* The diagram must be **saved** (dirty open diagrams are autosaved first when possible)
* The diagram must contain at least one table

## What's next

* [Create a conceptual model](/guides/create-conceptual-model)
* [Create a logical & physical model](/guides/create-logical-physical-model)
