This is a readme explaining how to use this codebase to hook into the Budibase public API in order to export all rows of a table to a CSV.
- Node version 12 and above
- Clone the repo.
git clone
the repo.cd
to the folder its located.npm install
inside the repo.- Rename the file
.env-template
to.env
.
- Get your Budibase API Key.
- Login to your Budibase instance.
- Click on your avatar at the top right of the page.
- Click
View API Key
, a popup should occur.
- Get your appID.
- Click into the app you wish to use this exporting codebase with.
- Look for the URL and copy the part of the URL that looks similar to this;
app_dev_cloudtestbb_28a92365115s234925b0cb28af1a27a17542
- Paste your appID into
APP_ID
within the.env
file.
- Paste your appID into
- Get your tableID
- Find the table you wish to export.
- Look at the url after
table/
you should find your table id. - It should look something like this;
ta_3946749e5d814449bdd51a5ec37d58e2
if its an external db and not an internal table it should look like this instead:datasource_plus_466537f1996c4d99add97f652378812b__posts_final
. - Paste your tableID into
TABLE_ID
within the.env
file.
After you have finished with the setup process. Run the command npm run export
, this should start a process in your terminal and export all your rows to a CSV file called output.csv
. (The time it takes varies depending on size)
You won't be able to export relationships, through testing I was able to pull the relevant _ids needed for relationships. However, when trying to re-import the CSV into the table again it ignored the relationship. I may do additional testing to see if there is a workaround
Find out more about Budibase.