Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions guides/developer/preview-projects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,23 @@ lightdash preview --name "PR: Add Revenue Metric"
lightdash preview --name "Long-lived preview" --expires-in 240
```

### Refreshing expiration on an existing preview

Re-running `lightdash start-preview` with the same `--name` as an existing preview refreshes its expiration. `expires_at` is recomputed from the moment of the re-run using the same rules as a fresh preview — bounded by the upstream project's default and maximum.

Omitting `--expires-in` on a re-run resets the expiration to the upstream project's default, since a re-run is treated as confirmation that the preview is still in use.

```bash
# First run: creates the preview and sets expires_at based on the upstream default
lightdash start-preview --name "ecom-shop-analytics"

# Later re-run without --expires-in: resets expires_at to the upstream default from now
lightdash start-preview --name "ecom-shop-analytics"

# Re-run with an explicit value: sets expires_at to 72 hours from now (capped at the maximum)
lightdash start-preview --name "ecom-shop-analytics" --expires-in 72
```

## Deleting a Preview Project

Preview projects created using any method can be deleted in the [Lightdash App](/guides/developer/preview-projects#lightdash-app-2).
Expand Down
4 changes: 4 additions & 0 deletions references/lightdash-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ All standard [dbt options](#dbt-options) work with `lightdash start-preview`.
- (default: false)
- Snowflake only. Disable converting timestamps to UTC. Applied and persisted when creating the preview project. When updating an existing preview, the flag is ignored with a warning and the saved project setting is used instead.

<Info>
**Re-running `lightdash start-preview` refreshes the expiration.** If the named preview already exists, `expires_at` is recomputed from the moment of the re-run using the same rules as a fresh preview (bounded by the upstream project's default and maximum). Omitting `--expires-in` on a re-run resets the expiration to the upstream project's default — a re-run is treated as confirmation that the preview is still in use.
</Info>


### `lightdash stop-preview`

Expand Down
Loading