> For the complete documentation index, see [llms.txt](https://endash-guidance-docs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://endash-guidance-docs.gitbook.io/docs/data/build-a-data-model.md).

# Build a Data model

## The Template method

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FRtR77oDlZpKNVBclKjFb%2Fimage.png?alt=media&amp;token=204b2408-c11b-4012-820c-aba6878b0d27" alt=""><figcaption></figcaption></figure>

* To begin click on the + Build a data model button, then click on the Template option.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FI9sMYxbdmEX5qjsxh8Zx%2Fimage.png?alt=media&amp;token=0aaf24ec-f083-44a3-accf-fb8cead522f3" alt=""><figcaption></figcaption></figure>

* You can also click on the ⋯ icon at the top right, then click on the Template option.

### Step 1 - Choose a Template

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FdqKPwLnYeiKgSwOqArj3%2Fimage.png?alt=media&amp;token=203a2278-5fdf-40b5-b189-bddfb355afa8" alt=""><figcaption></figcaption></figure>

* The template setup pop-up will appear.
* All the most relevant templates that contain your [Connection sources](/docs/connect/list-of-your-connections.md) will be displayed in the default list.&#x20;

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FLqpUekzutOE3Vz8nqxqU%2Fimage.png?alt=media&amp;token=3da673ac-7524-4ef3-8e5b-06de0aa3e149" alt=""><figcaption></figcaption></figure>

* Click on the dropdown box and click All templates to see more available templates.

{% hint style="info" %}
Check the [Data Templates](https://cigro-guidance-docs.gitbook.io/cigro-data-templates/) for the template you want that suits your needs.
{% endhint %}

### Step 2 - Check the details&#x20;

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FyxhMwh4elNCSlLONuOgx%2Fimage.png?alt=media&amp;token=790e31b1-76c2-4d72-8d86-ca081a7d3735" alt=""><figcaption></figcaption></figure>

* In Step 2 you can check which Data source supports in this template
* What kind of Type and Column Name for the Data source
* Click the Next button to continue.

### Step 3 - Select the Connections

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FudLmq55Z6ioJCozYuhl8%2Fimage.png?alt=media&amp;token=09dc3050-cf04-493b-91e8-a436ce39f557" alt=""><figcaption></figcaption></figure>

* All your Connections available for this template will be displayed for you to select or unselect.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FLiaFu3sOGO4FwbheqXlr%2Fimage.png?alt=media&amp;token=83452ca4-5122-4589-9d96-558bde6232d6" alt=""><figcaption></figcaption></figure>

* You can preview your data model before building.
* Click the Done button to finish.
* Click Previous to go back to the previous step.

***

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2F5GqCMXrEhe4gwQyohp8x%2Fimage.png?alt=media&amp;token=ea3cc93e-c357-45d8-928a-7dc8f79cc55c" alt=""><figcaption></figcaption></figure>

* Your data model will be displayed after the build is successful.

***

## The Query method

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FckI1wxkT70oXQu1Ns45y%2Fimage.png?alt=media&amp;token=fb668bbc-e3a1-4f73-94bd-c1ee565e9fed" alt=""><figcaption></figcaption></figure>

* To begin click on the + Build a data model button, then click on the Query option.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FcG38x6u2OYS3awvph62D%2Fimage.png?alt=media&amp;token=2a226e8a-de05-4c7b-ae55-6864ca4cf8b1" alt=""><figcaption></figcaption></figure>

* You can also click on the ⋯ icon at the top right, then click on the Query option.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2F1fxFrU0EdV3boxCagjtT%2Fimage.png?alt=media&amp;token=54ae4595-d232-4c75-ad2e-165c1fe77e38" alt=""><figcaption></figcaption></figure>

* A Build tab of the data model will be displayed.
* All other tabs will be disabled.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FgtZQe6SGjdjkUDQxqsHB%2Fimage.png?alt=media&amp;token=28ffcd9c-5abf-4cfe-8e87-5ebe61ecebb4" alt=""><figcaption></figcaption></figure>

* You can begin to query the same as in [Build - Data model](/docs/data/data-model-details/build-data-model.md).

{% hint style="info" %}
You can use our [AI query](/docs/data/build-and-modify-a-data-model-with-our-ai-query.md) to help you with the query.
{% endhint %}

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FLZ28pAqDmvmSFjCK5Z8n%2Fimage.png?alt=media&amp;token=96568e45-772a-413b-896f-27a5b954356e" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
You have to save your query when leaving or that newly created data model will be deleted.
{% endhint %}

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FcpWiBhgKcIdSxyH2zyhe%2Fimage.png?alt=media&amp;token=43a12254-e5ca-4fe6-a321-f58c957308a2" alt=""><figcaption></figcaption></figure>

* After querying and saving successfully, your newly constructed data mode will be ready to use.
