# MS SQL Connector

**Overview**&#x20;

The MS SQL connector in Graphite Note allows you to import your data from a MS SQL or run custom SQL queries directly within the platform.

**Prerequisites**&#x20;

Before starting, ensure your firewall allows incoming requests from the following IP address:&#x20;

* 99.81.63.220&#x20;

**Steps to Import Data**&#x20;

**1. Create a New Dataset**&#x20;

* Option 1: Go to the homepage and click on "Create" under Datasets.&#x20;
* Option 2: From the datasets list, click on "New Dataset."&#x20;

<figure><img src="/files/uRtvSAkBG3q22NhtU8Nn" alt=""><figcaption><p>Option 1: Create Dataset using homepage</p></figcaption></figure>

<figure><img src="/files/W7KWJO85W9etT1PIZoc1" alt=""><figcaption><p>Option 2: Create Dataset from the Dataset List page</p></figcaption></figure>

**2. Select MS SQL**

* Choose "MS SQL" as your dataset source and click "Next".&#x20;

<figure><img src="/files/4Sc2Q3Xlzyn69ZiO4Zs3" alt=""><figcaption></figcaption></figure>

**3. Enter Dataset Information**&#x20;

* Name: Provide a name for the dataset.&#x20;
* Description: Add a short description of the data.&#x20;
* Tags: Add tags for better organization.&#x20;
* Click "Next" to proceed.

<figure><img src="/files/hUupnzgz1xHeQ4BdlVo8" alt=""><figcaption><p>Name and Description for the dataset</p></figcaption></figure>

**4. Establish a Connection**&#x20;

Fill in the following connection details:&#x20;

* Server Name: Enter the hostname or IP address of your MS SQL instance.&#x20;
* Database Port: Enter the port number for your database (typically 1433).&#x20;
* Database User: Provide the username for the database.&#x20;
* Database Password: Enter the password for the database user.&#x20;
* Database Name: Specify the name of the database you wish to connect to.&#x20;
* **SSL (Secure Sockets Layer):** SSL is a protocol for encrypting information over the internet. If your MS SQL instance requires SSL, ensure you enable this option.<br>

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

**5. Check the Connection**&#x20;

* Click on "Check Connection" to validate the connection details.&#x20;

**6. Write and Run SQL**&#x20;

* Write the desired SQL query to fetch your data.&#x20;
* Click on the "Run SQL" button to execute the query and retrieve the data.&#x20;

**7. Review and Adjust Data**&#x20;

* You should see all the columns from the selected dataset appearing.&#x20;
* If necessary, you can change column names, data types, or data formats.&#x20;

**8. Create the Dataset**&#x20;

* Click on the "Create" button to finalize and create your dataset.&#x20;

**Troubleshooting Connection Issues**&#x20;

Ensure your firewall settings are configured to accept incoming requests from the IP address mentioned above. This is crucial for establishing a successful connection between Graphite Note and your MS SQL Server.&#x20;

**Import Process**&#x20;

Once the connection is validated:&#x20;

* Graphite Note will initiate the data import process.&#x20;
* The duration of this process depends on the size of your dataset. Small datasets will import in a few minutes, while larger datasets may take longer.&#x20;

**Next Steps**&#x20;

* Now that your data is imported and prepared, you can proceed to create a model without writing any code. Simply go to the [Models](https://app.gitbook.com/o/tMDHUVlAYCj1y8ercRu6/s/gnR78y9L7FDWeb4jdvdW/models/introduction) and follow the steps to build and deploy your model using Graphite Note's intuitive interface.&#x20;


---

# 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.graphite-note.com/graphite-note-documentation/datasets/data-sources/ms-sql-connector.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.
