# Modifying Selected Data Sources and Tables

### **How to Select a Data Source?**

1. Click on the **Data section** at the top of the chart configuration page.
2. Use the dropdown menu to choose a **data source** from the available list.
3. Once a **data source** is selected, the system will display the available **tables** within that data source.

📌 *Only tables with **completed data definitions** will be displayed.*

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

***

### **Why Are Some Tables Missing?**

The AI uses **data definitions** to:

* Generate **SQL queries**
* Determine the **best visualization type**
* Extract **relevant fields** for the chart

If a table is missing from the list:\
✔️ **Go back to the Data Connection settings.**\
✔️ **Ensure that the table has complete data definitions.**\
✔️ **Verify that the table permissions allow access for the user.**

📌 *If a table is not properly defined, AI may not be able to use it to generate insights.*

***

### **Selecting Multiple Tables**

Users can select **more than one table** from the data source.

* The AI will **automatically determine relationships** (joins, keys, and conditions) between the tables.
* The **generated SQL query** will be updated accordingly.

📌 *To view the query, go to the **SQL Section** (covered in the next section).*

***

### **How Changes Affect the Chart**

Whenever a user **modifies the data source or tables**, the system:

1. **Regenerates the SQL Query** based on the selected data.
2. **Updates the visualization** to reflect the new dataset.
3. **Adjusts the chart components** to align with the intent.

📌 *Every change in data selection will trigger a full recalibration of SQL, data structure, and visualization.*

***

### **Next Steps: Understanding SQL in Chart Configuration**

Now that the data source is selected, the next step is understanding how SQL is generated and modified in the **SQL Section**. 🚀


---

# 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.getinfinity.app/user-guide/comprehensive-user-guide/2.-charts/chart-customization/modifying-selected-data-sources-and-tables.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.
