Do you mind checking the GitHub script version, please? Without changing anything, I just downloaded the available version, used the tago-builder command to generate the code to be used in the cloud (as described in documentation) and got the following error:
[2022-04-07 08:16:02] (node:108) UnhandledPromiseRejectionWarning: undefined (Use `node --trace-warnings ...` to show where the warning was created) (node:108) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:108) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Thank you for contacting us and sorry for the inconvenience. We appreciate your feedback and we are aware of the issue with the GitHub script version. Unfortunately, the script is outdated and it does not work well with the newest bucket versions, which are Immutable and Mutable buckets. We are planning to update the script as soon as possible, but we cannot give you an exact timeline right now.
We have some good news for you! We have updated the outdated bulk import via CSV script and the CSV example as well.
To get the changes, you just need to reinstall the template and you are good to go. We hope you enjoy this feature and let us know if you have any questions or feedback.
How would we be able to also pre-define tags per device when bulk importing using a CSV?
For example, when I onboard a new user I’d want to pre-assign the tag key: company and tag value: company_name and maybe some other tags.Thanks!
Check Tago’s analysis-example-bulkupload on GitHub (https://github.com/tago-io/analysis-example-bulkupload) you will need to customize that script to reach what you’re looking for. The repo have the script from the analysis of this post.
Updating my question: It is possible to delete folders via script?
For example: I uploaded many CSV files to register the devices, but then I would like (and need because of the storage limit) to delete the folder “buckets” in my Tago profile → files → buckets with all of the CSV files.