# dap snapshot

The `dap snapshot` command downloads full snapshots of datasets at a specific point in time. This is ideal for creating an initial full copy of the dataset or performing occasional full updates. Snapshots are useful for comprehensive analyses, audits, and backups.

{% hint style="warning" %}
Regular use of snapshots is not recommended, as they are resource-intensive for the API and costly to process on the client side.
{% endhint %}

### Usage

```
dap [arguments] snapshot [flags]
```

### Options

**`--namespace <string>`**\
Specifies the data source (namespace). Available options: {canvas, canvas\_logs, catalog, new\_quizzes}.

**`--table <string>`**\
Specifies the table(s) to fetch data from. Can be a single table name, a comma separated list of table names or the special `all` keyword to fetch all tables in the namespace.

**`--format <string> (default: JSONL)`**\
Defines the output format. Available options: {CSV, JSONL, Parquet, TSV}.

**`--output-directory <string>`**\
Specifies the absolute or relative path to the output directory where the snapshot will be stored.

### Global options

**`--client-id <string>`**\
Client ID obtained from the Identity Service. Skip, if `DAP_CLIENT_ID` environment variable is set.

**`--client-secret <string>`**\
Client Secret obtained from the Identity Service. Skip, if `DAP_CLIENT_SECRET` environment variable is set.

**`-h, --help`**\
Displays help information for the command.

### Examples

Get a snapshot of the `courses` table from the `canvas` namespace:\
`$ dap snapshot --namespace canvas --table courses`

Get a snapshot of multiple tables or all tables of the `canvas` namespace:\
`$ dap snapshot --namespace canvas --table courses,users,wikis` `$ dap snapshot --namespace canvas --table all`

Get a snapshot of the `web_logs` table from `canvas_logs` namespace in CSV format\
`$ dap snapshot --namespace canvas_logs --table web_logs --format csv`

### Related Resources

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Key Concepts</strong></td><td>Get familiar with the key concepts in DAP.</td><td><a href="../../key-concepts">key-concepts</a></td></tr><tr><td><strong>Rate Limits &#x26; Policies</strong></td><td>Learn more about the limits and our policies in DAP.</td><td><a href="../../limits-policies">limits-policies</a></td></tr><tr><td><strong>Datasets</strong></td><td>Discover the available namespaces and tables.</td><td><a href="../../dataset">dataset</a></td></tr></tbody></table>
