> For the complete documentation index, see [llms.txt](https://docs.paradime.io/app-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paradime.io/app-help/guides-new/paradime-101/getting-started-with-the-paradime-ide/dinoai-accelerating-your-analytics-engineering-workflow/dinoai-agent/creating-dbt-sources-from-data-warehouse.md).

# Creating dbt Sources from Data 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.

{% embed url="<https://youtu.be/sAAAUo4OawM?si=7jVJPA2g48SnLhVX&t=26>" %}

### 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 by selecting your existing sources.yml file. Context helps DinoAI understand your existing project structure and make more relevant changes.
{% endhint %}

<figure><img src="/files/JQFbpLvDHIpVNKdalp3u" alt=""><figcaption></figcaption></figure>

### 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 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 %}

### Example Output

DinoAI will generate a properly formatted sources.yml file like this:

```yaml
version: 2

sources:
  - name: formula_one
    database: FORMULA_ONE_DB
    schema: raw
    tables:
      - name: CIRCUITS
        columns:
          - name: CIRCUITID
            data_type: NUMBER
          - name: CIRCUITREF
            data_type: VARCHAR
          # Additional columns...
            
      - name: CONSTRUCTORS
        columns:
          - name: CONSTRUCTORID
            data_type: NUMBER
          # Additional columns...
      
      # Additional tables...
```

### 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

### When to Use This

* When setting up a new dbt™ project
* When data engineers have added new tables to your warehouse
* During data migrations or schema updates
* Any time your source data structure changes


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.paradime.io/app-help/guides-new/paradime-101/getting-started-with-the-paradime-ide/dinoai-accelerating-your-analytics-engineering-workflow/dinoai-agent/creating-dbt-sources-from-data-warehouse.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
