# 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="https://3727300098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnR78y9L7FDWeb4jdvdW%2Fuploads%2F1S1emwzPFbrOi5WdiVaT%2FScreenshot%202024-07-23%20104135.png?alt=media&#x26;token=6a8fdffb-4ad3-44ba-bae3-08ee8a906b25" alt=""><figcaption><p>Option 1: Create Dataset using homepage</p></figcaption></figure>

<figure><img src="https://3727300098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnR78y9L7FDWeb4jdvdW%2Fuploads%2FrGNt9WQiRNGu8bC6wDyT%2FScreenshot%202024-07-23%20095530.png?alt=media&#x26;token=feec1124-7be1-4270-bca7-a049636ee487" 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="https://3727300098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnR78y9L7FDWeb4jdvdW%2Fuploads%2Fcign9AVbrvabaWnh6o0y%2FScreenshot%202024-07-29%20125337.png?alt=media&#x26;token=5db00937-8d02-46aa-b563-9d7911a8d565" 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="https://3727300098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnR78y9L7FDWeb4jdvdW%2Fuploads%2FLwNaZpchFK1PM2NavcnL%2FScreenshot%202024-07-23%20095900.png?alt=media&#x26;token=2f022290-aafa-4651-833c-ae0cdef9adc8" 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="https://3727300098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgnR78y9L7FDWeb4jdvdW%2Fuploads%2FTHR1vwmPOROchmyrabOp%2FScreenshot%202024-07-29%20153048.png?alt=media&#x26;token=c870429f-219c-420a-a1b3-faa30edcf5c1" 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;
