# Data Connections

Data Connections are how production AI log data is ingested into your DBNL [Deployment](https://docs.dbnl.com/v0.29.x/platform/deployment) as part of the [Data Pipeline](https://docs.dbnl.com/v0.29.x/configuration/data-pipeline). Each [Project](https://docs.dbnl.com/v0.29.x/workflow/projects) has one ingestion method that is set at creation. If you need to change this later you can do this via the [Project settings page](https://docs.dbnl.com/v0.29.x/workflow/projects#modifying-a-project).

<figure><img src="https://content.gitbook.com/content/lUoirJaFEHofsQHmOtdL/blobs/c3kzayobKkrMUVZcpjRI/DBNL-data-connections.png" alt=""><figcaption><p>Data Connections are how Production AI log data is ingested into DBNL, kicking off the <a href="../workflow/adaptive-analytics-workflow">Analytics Workflow</a>.</p></figcaption></figure>

DBNL supports three methods of data ingestion:

* [OTEL Trace Ingestion](https://docs.dbnl.com/v0.29.x/configuration/data-connections/otel-trace-ingestion): Publish OTEL traces directly to DBNL as the product runs.
* [SDK Log Ingestion](https://docs.dbnl.com/v0.29.x/configuration/data-connections/sdk-log-ingestion): Push data manually or as part of a daily orchestration job using the [Python SDK](https://github.com/dbnlAI/docs/blob/main/reference/python-sdk.md).
* [SQL Integration Ingestion](https://docs.dbnl.com/v0.29.x/configuration/data-connections/sql-integration-ingestion): Pull data from a SQL table into DBNL on a schedule.

{% hint style="warning" %}
Regardless of the data ingestion method, make sure your data adheres to the [DBNL Semantic Convention](https://docs.dbnl.com/v0.29.x/configuration/dbnl-semantic-convention) to enable the richest analysis of the data.
{% endhint %}

| Ingestion Type            | Pros                                                                                                                                                                                                              | Cons                                                                                                                                                                 |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OTEL Trace Ingestion      | <ul><li>Get rich data logged in a few lines of embedded code</li><li>Enables full trace inspection in Logs page</li><li>Automatically maps to DBNL Semantic Convention if using standard semantic types</li></ul> | <ul><li>Cannot backfill data, requiring a full week before first Insights</li><li>Clickhouse support needs to be enabled during installation of Deployment</li></ul> |
| SDK Log Ingestion         | <ul><li>Most flexible, can contain a full trace as part of a log line</li><li>Can backfill previously logged data</li></ul>                                                                                       | <ul><li>Requires Python SDK code to be written and scheduled as part of external orchestration service</li></ul>                                                     |
| SQL Integration Ingestion | <ul><li>Leverages currently logged data in SQL tables</li><li>No code required</li><li>Scheduling from DBNL Platform</li><li>Can backfill previously logged data</li></ul>                                        | <ul><li>Requires log data to be already flattened and stored in a SQL table</li><li>May require complex SQL queries to adapt to DBNL Semantic Convention</li></ul>   |

### Managing Data Connections

#### Creating a New Data Connection

From the [Namespace](https://docs.dbnl.com/v0.29.x/platform/administration#namespaces) landing page click on "Data Connections" on the left panel. On the Data Connections landing page "+ Add Data Connection" in the upper right. Provide a required name for the Data Connection and an optional description. All Data Connections will be available to any [User](https://docs.dbnl.com/v0.29.x/platform/administration#users) creating a [Project](https://docs.dbnl.com/v0.29.x/workflow/projects) in the [Namespace](https://docs.dbnl.com/v0.29.x/platform/administration#namespaces).

<figure><img src="https://content.gitbook.com/content/lUoirJaFEHofsQHmOtdL/blobs/2jaLvWfCVHzyqMHgdyVZ/image.png" alt=""><figcaption></figcaption></figure>
