# Import from SQL Database

## Importing from SQL Database

AirOps enables you to connect your Knowledge Base directly to SQL databases, allowing you to import structured data and make it semantically searchable. This powerful integration lets you leverage your existing database information without manual exports.

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

To import data from an SQL database:

* Click "Add Data" and select "Import from SQL Database" from the dropdown menu
* Select a previously connected database or connect a new one through the settings
* Name your query for future reference
* Write your SQL query, ensuring you include these required columns:
  * `id`: A unique identifier for each row
  * `content`: The column or concatenated columns you want to make searchable
* Click "Test Connection" to verify your query before importing
* Once verified, import your data to add it to your Knowledge Base

When writing your query, you can use SQL functions like `CONCAT` to combine multiple columns into a single searchable content field, creating richer context for your Knowledge Base.

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


---

# 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.airops.com/context/memory-stores/add-data/import-from-sql-database.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.
