# Data Connections

Data Connections are how production AI log data is ingested into your DBNL [Deployment](https://docs.dbnl.com/v0.30.x/platform/deployment) as part of the [Data Pipeline](https://docs.dbnl.com/v0.30.x/configuration/data-pipeline). Each [Project](https://docs.dbnl.com/v0.30.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.30.x/workflow/projects#modifying-a-project).

<figure><img src="https://content.gitbook.com/content/rsm4qOLTbARYHG7ZikPw/blobs/MLPIrmyep7UtzQWTSU6r/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 two methods of data ingestion:

* [OTEL Trace Ingestion](https://docs.dbnl.com/v0.30.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.30.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).

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

<figure><img src="https://3585397568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Frsm4qOLTbARYHG7ZikPw%2Fuploads%2FqTm2wr8CuC0hcmalGTzU%2Fdata-conn-tree.png?alt=media&#x26;token=8ba2fc8a-9d0f-4db6-b871-5ff7940eb9fc" alt=""><figcaption></figcaption></figure>

| 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></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> |

### Managing Data Connections

#### Creating a New Data Connection

From the [Namespace](https://docs.dbnl.com/v0.30.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.30.x/platform/administration#users) creating a [Project](https://docs.dbnl.com/v0.30.x/workflow/projects) in the [Namespace](https://docs.dbnl.com/v0.30.x/platform/administration#namespaces).

<figure><img src="https://content.gitbook.com/content/rsm4qOLTbARYHG7ZikPw/blobs/Av8klHvs8Xl34Qut8EAF/image.png" alt=""><figcaption></figcaption></figure>
