Git Product home page Git Product logo

bb-export-table-to-csv's Introduction

Bb-export-table-to-csv

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.

Requirements

  • Node version 12 and above

Setup

  • 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.
    Screenshot 2023-07-13 at 14 39 54 * Copy your API key from the window. Screenshot 2023-07-14 at 07 48 17 * Paste your API into `BUDIBASE_API_KEY` within the `.env` file.
  • 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.
  • 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.

Command

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)

Demo

bb csv export public api

Limitation

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.

bb-export-table-to-csv's People

Contributors

conorwebb96 avatar

Stargazers

 avatar Andrew Thompson avatar

Forkers

andz-bb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.