# Data locations

## Source database connection <a href="#workspace-config-source-database" id="workspace-config-source-database"></a>

For data connectors that connect to a database, the **Source Settings** section provides connection information for the source database.

You cannot change the source data configuration for a [child workspace](/app/workspace/managing-workspaces/workspaces-inheritance.md).&#x20;

For information about the source connection fields for a specific data connector, go to the workspace configuration topic for that [connector type](/app/setting-up-your-database/data-connector-summary.md).

## Upsert configuration <a href="#workspace-config-connection-upsert" id="workspace-config-connection-upsert"></a>

For data connectors that support upsert, the workspace configuration includes an **Upsert** section to allow you to enable and configure upsert. Upsert adds and updates rows in the destination database, but keeps all other existing rows intact.&#x20;

If you enable upsert, then you cannot write output to a container repository. You must write the output to a destination database.

For more information, go to [Enabling and configuring upsert](/app/workspace/workspace-configuration-settings/workspace-config-upsert.md).

## Destination data location <a href="#workspace-config-destination-data" id="workspace-config-destination-data"></a>

For data connectors that connect to a database, the **Destination Settings** section provides information about where and how Structural writes the output data from data generation.

Depending on the data connector type, you might be able to write to either:

* Destination database - Writes the output data to a destination database on a database server.
* Container repository - Writes the output data to a data volume in a container repository.

### Destination database <a href="#workspace-config-connection-source-destination" id="workspace-config-connection-source-destination"></a>

When you write the output to a destination database, the destination database must be of the same type as the source database.

Structural does not create the destination database. It must exist before you generate data.

In **Destination Settings**, you provide the connection information for the destination database. For information about the destination database connection fields for a specific data connector, go to the workspace configuration topic for that [connector type](/app/setting-up-your-database/data-connector-summary.md).

If available, the **Copy Settings from Source** allows you to copy the source connection details to the destination database, if both databases are in the same location. Structural does not copy the connection password.

### Container repository <a href="#workspace-connection-other-config-containers" id="workspace-connection-other-config-containers"></a>

Some data connectors allow you to write the transformed data to a data volume in a container repository instead of to a database server.

For more information, go to [Writing output to a container repository](/app/workspace/workspace-configuration-settings/workspace-config-write-to-container-artifacts.md).

## File connector source and destination data <a href="#workspace-config-connection-file-connector" id="workspace-config-connection-file-connector"></a>

A [file connector](/app/setting-up-your-database/file-connector.md) workspace uses files as its source data and produces transformed versions of those files as its output.

For file connector workspaces, the **File Location** section indicates where the source files are obtained from - either a local file system or a cloud storage solution (Amazon S3 or Google Cloud Storage).

When the files come from cloud storage, the **Output Location** section indicates where to write the transformed files. You must also provide the cloud storage connection credentials.

For more information, go to [Configuring the file connector storage type and output options](/app/setting-up-your-database/file-connector/file-connector-workspace-config.md).


---

# 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.tonic.ai/app/workspace/workspace-configuration-settings/data-connection-settings/data-locations.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.
