# Datastreams

A datastream is a structured way to import your data into Marple DB.&#x20;

In the example setup below, there are three datastreams:

1. **Simulation data:** for importing MATLAB files
2. **Heat measurements**: for zipped CSV files
3. **Car data**: for MDF files

<figure><img src="/files/Y4tZcd6jUkvWPxI0Cjwk" alt=""><figcaption></figcaption></figure>

Each of these datastreams contains different files, and has a different configuration.

## Importing data

Upload one or multiple files by

* Clicking "Upload Files"
* or by drag and dropping them on the "Upload Files" button

<figure><img src="/files/DnDO8cNqzIer5bnP9eAd" alt=""><figcaption></figcaption></figure>

The import status is shown next to each file.

* <mark style="color:blue;background-color:blue;">**Uploading**</mark> is shown while the upload is in progress.&#x20;
* <mark style="color:blue;background-color:blue;">**Importing**</mark> means the file is being handled by the plugin. If supported, the plugin will first import priority signals. They will first become available in cold storage and are automatically saved in hot storage as well.
* <mark style="color:red;background-color:red;">**Failed**</mark> means something went wrong. Click the "Failed" to see more details.
* <mark style="color:orange;background-color:yellow;">**Waiting**</mark> means the file is in the queue. By default, two files can be imported in parallel, but this depends on your server configuration.
* <mark style="color:green;background-color:green;">**Imported**</mark> means that all data and metadata is processed

<figure><img src="/files/SMOkJEWwjNc7mNMaCdl5" alt="" width="302"><figcaption></figcaption></figure>

{% hint style="info" %}
Once your stream is set up, we encourage automating uploads using [`stream.push_file(...)`](https://docs.marpledata.com/docs/sdk/overview/python-sdk) in the [Python SDK](/docs/sdk/overview/python-sdk.md), or implement it another language using our REST API [Uploading files](/docs/sdk/overview/rest-api/uploading-files.md)
{% endhint %}

## .Metadata

File metadata can be added both manually and automatically.

**Manually**

1. Manually for an individual file

<figure><img src="/files/4GDIZU9swKi7NNuhOQBx" alt="" width="375"><figcaption></figcaption></figure>

2. By uploading a `.csv` file, with a column `dataset` and a column for each field you want to set. Example:

```
dataset,Location,Scientist
file1.csv,Italy,James
file2.csv,Spain,Hilde
file3.csv,Germany,Michel
```

{% hint style="warning" %}
Uploading a `.csv` file will overwrite existing metadata values if they were there before.
{% endhint %}

**Automatically**

* From the file upon importing (if the plugin supports it, like [MDF](/docs/marple-db/datastreams/supported-file-types.md#mdf)).
* Using our [SDK & API](/docs/sdk/overview.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.marpledata.com/docs/marple-db/datastreams.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.
