You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/references/dashboards-as-code.mdx
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ import DownloadContent from './assets/download-content.jpg';
4
4
5
5
You can download your charts and dashboards as code, make changes, then upload your changes back to your Lightdash project using the CLI. Content as code is also useful for creating new Lightdash projects where you want the content to be copied from an existing project and added to your new project.
6
6
7
-
## `lightdash download` downloads content as code
7
+
## `lightdash download`
8
8
9
9
From the [Lightdash CLI](/references/lightdash-cli), you can use the command `lightdash download` to download all of the charts and dashboards from your Lightdash project as code. All of the charts and dashboards will be written as .yml files to a `lightdash` directory wherever you're running the command.
10
10
@@ -26,7 +26,7 @@ For example:
26
26
- I run `lightdash download` again
27
27
- The changes I made to `emea-revenue-per-month.yml` will be overwritten by the latest chart version downloaded from the Lightdash application
28
28
29
-
### Use `lightdash download -c` or `lightdash download --charts`to select specific charts
29
+
### Select specific items to download
30
30
31
31
If you only want to download specific charts to manage as code, you can use the chart selector in the download command.
You can use the chart's SLUG, UUID, or the URL to the saved chart to select the chart.
40
40
41
-
### Use `lightdash download -d` or `lightdash download --dashboards` to select specific dashboards
41
+
**Use `lightdash download -d` or `lightdash download --dashboards` to select specific dashboards**
42
42
43
43
This will download the dashboard and all of the charts in the dashboard as code. For example, if I only wanted to download a specific dashboard as code, I would run the command:
44
44
@@ -62,7 +62,7 @@ You can combine charts and dashboards selection in a single command. For example
### Use `lightdash download -p` or `lightdash download --path` to specify a directory to download to
65
+
### Specify your download path
66
66
67
67
By default, `lightdash download` will create a new `lightdash` directory in your current working directory and write the content there. You can customize the directory that you write to using `lightdash download -p`. For example:
68
68
@@ -78,7 +78,7 @@ You can also use relative paths like:
78
78
lightdash download -p ../
79
79
```
80
80
81
-
### Use `lightdash download --project <project UUID>`to download all content from a specific project
81
+
### Specify a project to download
82
82
83
83
Running `lightdash download` will download all content from your current set project (set using `lightdash config set-project`). But, you can download content from another project using `lightdash download --project my-project-uuid`. For example:
You can find a project's UUID from your Lightdash URL. For example, `https://app.lightdash.cloud/projects/123-project-uuid/`. Here, the project UUID here is `123-project-uuid` .
90
90
91
-
## `lightdash upload` updates any content as code to your project
91
+
## `lightdash upload`
92
92
93
93
From the [Lightdash CLI](/references/lightdash-cli), you can use the command `lightdash upload` to upload any changes you've made to your charts or dashboards as code. To upload new charts that you've created as code to your Lightdash project, you need to run `lightdash upload --force`
94
94
95
-
### Use `lightdash upload -c` or `lightdash upload --charts`to select specific charts
95
+
### Select specific items to upload
96
96
97
97
For example, if I only wanted to upload a specific saved chart as code, I would run the command:
### Use `lightdash upload -p` or `lightdash upload --path` to specify a directory to upload from
121
+
### Specify your upload path
124
122
125
123
By default, `lightdash upload` will upload all items you have saved in the `lightdash` directory in your current working directory. You can customize the directory that you upload from using `lightdash upload -p`. For example:
126
124
@@ -136,7 +134,7 @@ You can also use relative paths like:
136
134
lightdash download -p ../
137
135
```
138
136
139
-
### Use `lightdash upload --project <project UUID>`to upload your content to a specific project
137
+
### Specify a project to upload to
140
138
141
139
Running `lightdash upload` will upload all content to your current set project (set using `lightdash config set-project`). But, you can upload content to another project using `lightdash upload --project my-project-uuid`. For example:
0 commit comments