# datasets

## list

List all dataset names available in the database. A substring filter can be provided as a flag.

```
tkio datasets list
```

<table><thead><tr><th width="163">Optional Flag</th><th>Description</th></tr></thead><tbody><tr><td>--substring</td><td>Substring to filter dataset names with. Will match prefix or suffix.</td></tr><tr><td>--json</td><td>Output to json file in current directory</td></tr></tbody></table>

## search

Search for and return a dataset config.

```
tkio datasets search {name}
```

<table><thead><tr><th width="154">Optional Flag</th><th>Description</th></tr></thead><tbody><tr><td>--json</td><td>Output to json file in current directory</td></tr></tbody></table>

## diff

Compare local dataset config (json) with one present in the database.

```
{local_json} > tkio diff
```

<table><thead><tr><th width="154">Optional Flag</th><th>Description</th></tr></thead><tbody><tr><td>--name</td><td>Name of dataset to diff against. Will infer name from local file if not provided.</td></tr><tr><td>--attribute</td><td>Name of attribute to narrow down difference to.</td></tr><tr><td>--json</td><td>Output to json file in current directory</td></tr></tbody></table>

## edit

Edit a single attribute of a dataset config.

```
tkio datasets edit {name} --attribute {attribute} --value {value}
```

<table><thead><tr><th width="154">Optional Flag</th><th>Description</th></tr></thead><tbody><tr><td><p>--append/</p><p>--overwrite</p></td><td>Append/overwrite value of attribute if it is part of a list.</td></tr></tbody></table>

## add

Add a dataset to the terrak.io database depending on a local json file.

```
{local_json} > tkio datasets add
```

## delete

Delete a dataset from the terrak.io database.

```
tkio datasets delete {name}
```


---

# 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://test-341.gitbook.io/terrakio/terrak.io/cli/datasets.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.
