> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/docs/de/kontext/knowledge-bases/add-data/import-from-sql-database.md).

# Aus SQL-Datenbank importieren

## Import aus einer SQL-Datenbank

Mit AirOps können Sie Ihre Wissensdatenbank direkt mit SQL-Datenbanken verbinden. So können Sie strukturierte Daten importieren und semantisch durchsuchbar machen. Dank dieser leistungsstarken Integration können Sie die Daten Ihrer vorhandenen Datenbank nutzen, ohne sie manuell exportieren zu müssen.

<figure><img src="https://1960680173-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-2271d7c9f62b242f859e3c0eb919ecfa9b3f4b88%2Fkb-sql-01-menu.png?alt=media" alt="Add Data menu with Import from SQL Database highlighted"><figcaption><p>Wählen Sie „Aus SQL-Datenbank importieren“ aus.</p></figcaption></figure>

So importieren Sie Daten aus einer SQL-Datenbank:

* Klicken Sie auf „Daten hinzufügen“ und wählen Sie im Dropdown-Menü „Aus SQL-Datenbank importieren“ aus.
* Wählen Sie eine bereits verbundene Datenbank aus oder verbinden Sie über die Einstellungen eine neue.
* Geben Sie Ihrer Abfrage einen Namen, damit Sie sie später wiederfinden.
* Schreiben Sie Ihre SQL-Abfrage und achten Sie darauf, dass sie die folgenden erforderlichen Spalten enthält:
  * `id`: Ein eindeutiger Bezeichner für jede Zeile
  * `content`: Die Spalte oder zusammengeführten Spalten, die durchsuchbar sein sollen
* Klicken Sie auf „Verbindung testen“, um Ihre Abfrage vor dem Import zu überprüfen.
* Importieren Sie Ihre Daten, sobald die Überprüfung erfolgreich war, um sie Ihrer Wissensdatenbank hinzuzufügen.

Beim Schreiben Ihrer Abfrage können Sie SQL-Funktionen verwenden, zum Beispiel `CONCAT` um mehrere Spalten zu einem einzelnen durchsuchbaren Inhaltsfeld zusammenzuführen und so den Kontext Ihrer Wissensdatenbank anzureichern.

<figure><img src="https://1960680173-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-ffb67e9ec0c519e58e0dd884fa0a18fe17d03259%2Fkb-sql-02-query.png?alt=media" alt="Import from SQL Database dialog with the query name Launch records, the SpaceOps Warehouse (Snowflake) database, a SELECT query, and a Test Connection button"><figcaption><p>Schreiben Sie eine Abfrage, die die zu importierenden Zeilen zurückgibt.</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/docs/de/kontext/knowledge-bases/add-data/import-from-sql-database.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
