# Creating Sources from your Warehouse

Setting up source definitions in dbt™ projects involves querying information schemas, documenting tables and columns, ensuring proper YAML formatting, and keeping sources up-to-date as new tables are added. This manual process can be time-consuming and prone to errors.

DinoAI Agent can automatically generate complete and accurate sources.yml files by directly accessing your data warehouse metadata.

### Example Prompt

> *I uploaded some new data to my data warehouse. Can you create a sources.yaml file?*

{% hint style="info" %}
**Optional**: When updating existing sources with new tables, you can add [context](https://docs.paradime.io/app-help/documentation/dino-ai/context) by selecting your existing sources.yml file. Context helps DinoAI understand your existing project structure and make more relevant changes.
{% endhint %}

<figure><img src="https://2337193041-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHET0AD04uHMgdeLAjptq%2Fuploads%2FITztcCqLasiHf39h1k3F%2Fimage.png?alt=media&#x26;token=497a1c8d-9bfd-4a79-b365-b9dcb5e4d2e0" alt=""><figcaption></figcaption></figure>

***

### Step-by-Step Instructions

{% hint style="info" %}
**Prerequisite: Connect your warehouse** to your [Code IDE environment](https://docs.paradime.io/app-help/documentation/settings/connections/development-environment)
{% endhint %}

1. **Open DinoAI** by clicking the DinoAI icon (🪄) in the left panel
2. Ensure **Agent Mode** is selected
3. **Optional*****:*** [**Add context**](https://docs.paradime.io/app-help/documentation/dino-ai/context) by clicking the "@" symbol and selecting any existing sources.yml files
4. **Enter your prompt** requesting a sources.yml file creation
5. **Review the preview** of the generated YAML file
6. **Accept the changes** to create the file in your project
7. **Verify the file** has been created correctly with all expected sources

{% @arcade/embed flowId="YcNcYxttOItDt1B4eMi7" url="<https://app.arcade.software/share/YcNcYxttOItDt1B4eMi7>" %}

***

### How It Works

After you enter your prompt:

1. DinoAI connects to your data warehouse and scans available schemas and tables
2. It retrieves column information including data types
3. If configured, DinoAI applies your [.dinorules](https://docs.paradime.io/app-help/documentation/dino-ai/dino-rules) preferences
4. It generates a properly formatted sources.yml file

{% hint style="info" %}
**Note**: If you're updating existing (not creating) a YAML file, DinoAI preserves existing documentation and adds only the new tables
{% endhint %}

***

### Key Benefits

* **Time Savings**: Reduces a 30+ minute manual task to seconds
* **Accuracy**: Eliminates typos and formatting errors
* **Maintainability**: Makes it easy to keep sources up-to-date as your warehouse evolves
* **Completeness**: Captures all tables and columns without missing anything


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/documentation/dino-ai/agent-mode/use-cases/creating-sources-from-your-warehouse.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
