# Get data

In this section, we will get the data by connecting to a database through **DirectQuery mode in Power BI.**

{% hint style="info" %}
If you're looking to create a table from scratch or import spreadsheet data, you can refer to  [this section](https://docs.editable.io/getting-data-into-editable/create-a-table).
{% endhint %}

1. To load the required data into Power BI, select **Get data** on the Home ta&#x62;**.** The procedure is the same as importing any data into Power BI. In this example, we'll choose 'Azure SQL database'.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FPciJtLZaOOsLJSMh2atV%2Fimage.png?alt=media&#x26;token=0f12cb5c-fc28-4f63-ac97-4a00c0ec946e" alt=""><figcaption><p>Select database</p></figcaption></figure>

2. In the SQL Server database dialog box, enter the **Server** and **Database (optional)** names, and make sure the **Data Connectivity mode** is set to **DirectQuery**.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2Fsuji13I7NMT8CDkEozeT%2Fimage.png?alt=media&#x26;token=476847b0-b749-47d4-8eb2-4a9a93326a63" alt=""><figcaption><p>Enter the server and database names</p></figcaption></figure>

{% hint style="info" %}
EDITable connects to data sources only through **DirectQuery.** This ensures the report always uses the current data.&#x20;
{% endhint %}

**Note:** For any database connection, make sure to select DirectQuery mode. Please find below the image that appears when you select a Snowflake database.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FvxyQRtD4TwjuIFfOUoly%2Fimage.png?alt=media&#x26;token=6b2d224e-ea41-4123-8cbd-19fefadfacc9" alt="" width="375"><figcaption><p>DirectQuery mode</p></figcaption></figure>

3. Select the required table in the Navigator to preview the data and click **Load.** No transformation is required for this data as it is already prepared.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FHT3XA3DvDcxgGIwenKsi%2Fimage.png?alt=media&#x26;token=0337d998-4857-486c-9d52-47960c050f12" alt="" width="563"><figcaption><p>Load data</p></figcaption></figure>

4. You might get a warning pop-up depending on the connection you choose. Since you will be connecting to your trusted source, you can proceed by clicking **OK** to load the data.

You can now view the 'EmployeeDemo' table in the Data pane. Note that the connection is through DirectQuery.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FZbmBShbweKZKuswPwEfL%2Fimage.png?alt=media&#x26;token=9fc52dd9-40da-4ae2-826e-01c7efb755a1" alt=""><figcaption><p>Data loaded in the Data pane</p></figcaption></figure>

Now that we have connected to the database, the next step is to assign the fields in the Visualizations pane.
