> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thinkplatform.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Choose User guide for browser tasks, Developers for CLI, SDK and external agents, and Administration for organization management.
> Confirm identity and organization/project context before operations. Documentation access does not grant ThinkPlatform permissions.
> Review side effects, verify changes with a read, and do not blindly retry an operation with an uncertain outcome.
> Use documented UI steps for the web app and documented public CLI or SDK interfaces for automation. Follow each page’s prerequisites and authentication requirements.

# Upload and inspect Data Lake files

> Upload local files, inspect paged listings, and resolve project Data Lake paths.

Complete [installation](https://docs.thinkplatform.ai/cli/get-started/installation.md), [authentication](https://docs.thinkplatform.ai/cli/get-started/authentication.md), and [context selection](https://docs.thinkplatform.ai/cli/guides/context.md). This guide uses the `datalake` command group.

## Choose the destination

These examples use your active profile and saved project context. Check the destination before uploading:

```bash theme={"system"}
tp context show
```

Use an explicit logical namespace. `project/uploads/example.csv` refers to the selected project's Data Lake area. `shared/` addresses shared storage, subject to access. `legacy/` is read-only. Bare paths are interpreted relative to `project/`; they do not address historical root-level blobs. The CLI rejects `..` segments and writes targeting another project's `projects/PROJECT_ID/` namespace, where `PROJECT_ID` is that other project's identifier.

## Plan and upload one file

Choose a new destination and replace `./example.csv` with an existing local file. Review its path and size in the plan before executing:

```bash theme={"system"}
tp datalake upload-file \
  --local-path ./example.csv \
  --remote-path project/uploads/example.csv \
  --dry-run

tp datalake upload-file \
  --local-path ./example.csv \
  --remote-path project/uploads/example.csv
```

The dry run builds a local upload plan without requesting upload URLs or uploading bytes. Actual uploads use ThinkPlatform-issued SAS URLs. On success, inspect `ok`, `uploaded_count`, and `uploads`, then verify the remote listing. Do not treat a failed or interrupted upload as proof that no bytes were stored. Check the destination before repeating it.

For a directory, relative file paths are preserved below the remote prefix. The local directory must contain at least one file:

```bash theme={"system"}
tp datalake upload-dir \
  --local-dir ./dataset \
  --remote-prefix project/uploads/dataset \
  --dry-run
```

Inspect the complete file list before running the same command without `--dry-run`. Choose only files intended for that project. Upload transport options are documented in `tp datalake upload-dir --help` and the [command reference](https://docs.thinkplatform.ai/cli/reference/commands.md).

## Inspect directories and files

`tree` lists child directories; `list` includes files and directories. Start with the directory you want to inspect:

```bash theme={"system"}
tp datalake tree \
  --path project/uploads

tp datalake list \
  --path project/uploads
```

The tree result is an array. The list result contains `items` and may contain a continuation token. Inspect the actual token field (`continuationToken` or `continuation_token`) before requesting another page:

```bash theme={"system"}
tp datalake list \
  --path project/uploads --continuation-token 'TOKEN_FROM_PREVIOUS_RESULT'
```

Replace the quoted token with the value returned for that listing. `--limit`, `--offset`, and `--path-contains` shape the fetched records locally; a local limit does not request a backend page of that size or prove the directory has only that many entries. Advance the local offset to inspect the rest of a fetched page before following its continuation token.

For a complete inventory, `list --all` follows continuation pages. It fetches all pages before applying local limits, so avoid it for an initial exploratory read. `--format jsonl` emits one item per line and omits the surrounding page metadata; use ordinary JSON while discovering continuation tokens.

## Preview or resolve a selected path

Copy an exact path from the listing:

```bash theme={"system"}
tp datalake preview \
  --path project/uploads/example.csv

tp datalake resolve-uri \
  --path project/uploads/example.csv
```

Preview prints the endpoint's JSON or text response. A binary response requires `--output`; this saves the raw preview response and does not promise the original file or a full-file download:

```bash theme={"system"}
tp datalake preview \
  --path project/uploads/example.csv --output ./example.preview
```

The preview endpoint determines content and size; the command has no row-limit or byte-limit option. Use it on a selected file rather than looping through an entire directory. `resolve-uri` returns fields including `abfss_uri`, `logical_path`, `physical_path`, and `scope`. Inspect the returned URI for downstream tools that support ADLS; resolution does not transfer file contents or grant those tools access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.