# 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="https://2441185785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeTNY9XuZbora2UmeM4sm%2Fuploads%2Fz6OWuY2freqevgEJqwpE%2Fimage.png?alt=media&#x26;token=b9ea3bdd-3368-4630-8f9d-a7f5dfccd257" 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**. 🚀
