> For the complete documentation index, see [llms.txt](https://docs.fluentbit.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluentbit.io/manual/1.5/pipeline/outputs/treasure-data.md).

# Treasure Data

The **td** output plugin, allows to flush your records into the [Treasure Data](http://treasuredata.com) cloud service.

## Configuration Parameters

The plugin supports the following configuration parameters:

| Key      | Description                                                                                                                                                                        | Default |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| API      | The [Treasure Data](http://treasuredata.com) API key. To obtain it please log into the [Console](https://console.treasuredata.com) and in the API keys box, copy the API key hash. |         |
| Database | Specify the name of your target database.                                                                                                                                          |         |
| Table    | Specify the name of your target table where the records will be stored.                                                                                                            |         |
| Region   | Set the service region, available values: US and JP                                                                                                                                | US      |

## Getting Started

In order to start inserting records into [Treasure Data](https://www.treasuredata.com), you can run the plugin from the command line or through the configuration file:

### Command Line:

```bash
$ fluent-bit -i cpu -o td -p API="abc" -p Database="fluentbit" -p Table="cpu_samples"
```

Ideally you don't want to expose your API key from the command line, using a configuration file is higly desired.

### Configuration File

In your main configuration file append the following *Input* & *Output* sections:

```python
[INPUT]
    Name cpu
    Tag  my_cpu

[OUTPUT]
    Name     td
    Match    *
    API      5713/e75be23caee19f8041dfa635ddfbd0dcd8c8d981
    Database fluentbit
    Table    cpu_samples
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.fluentbit.io/manual/1.5/pipeline/outputs/treasure-data.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.
