# Overview of the file connector process

The file connector uses text files for the source and destination data.

## Using files from cloud storage <a href="#file-connector-overview-cloud-storage" id="file-connector-overview-cloud-storage"></a>

The recommended option is to have the files in cloud storage. The files can be in either:

* Amazon S3
* MinIO
* Google Cloud Storage (GCS)

<figure><img src="/files/X1Wj8nC5buzc6ESwdrUJ" alt=""><figcaption><p>Cloud Storage process for the file connector</p></figcaption></figure>

Within a file connector workspace, you create file groups. A file group is a set of files that have the same format and structure. The file group points to the files in the cloud storage location.

Tonic Structural treats each file group as a table. Within the file groups, you configure the generators to apply to the columns.

When you run data generation, Structural writes the output files to the configured destination file storage location for the workspace.

In the destination location, each source file is represented by a corresponding destination file that has the same name.

## Local files <a href="#file-connector-overview-local-files" id="file-connector-overview-local-files"></a>

You can also use files from a local file system.

<figure><img src="/files/qoE3NWXciNJHUgPFQVH6" alt=""><figcaption><p>File connector process for local files</p></figcaption></figure>

For a file connector workspace that uses local files, when you add files to a file group, Structural encrypts the selected files. It then stores the files in the large file store of the Structural application database.

When you remove a file from a file group, remove an entire file group, or delete the workspace, Structural also removes those stored files.

When you run data generation, Structural also writes the output files to the large file store of the Structural application database. You can then [download the most recently generated files](/app/setting-up-your-database/file-connector/file-connector-download-generated-files.md).

## File mount

{% hint style="info" %}
Not available on Structural Cloud.
{% endhint %}

For self-hosted instances, another option is to use a file mount to make local files available to a file connector workspace.

<figure><img src="/files/0Y2bGbukDmaTsOZ3wPlG" alt=""><figcaption><p>File connector process for a file mount</p></figcaption></figure>

For a file mount workspace, Structural can write the transformed files to either a cloud storage location or back to the file mount.


---

# 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/setting-up-your-database/file-connector/connectors-file-overview.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.
