Data Export Overview

:memo: This tutorial is deprecated; please check the updated version here: Data Export

@Kelvin Welter

Data export on the TagoIO platform has been designed to be as easy as possible to provide agility and convenience for the user to export data in several formats. You can find this feature on the Buckets tab within the TagoIO platform.

There are several filter options and format options for export as you can see in the following image:

Now, let’s detail each option so you know how to work with data export.

  • File Format: You can export your data in 4 different formats, you choose which one you want. Available formats are XLSX, CSV, XML, and JSON.

  • Timezone: For greater versatility, you can select the timezone you want for your data. You can choose between the timezone used on your profile or UTC timezone.

  • Start and End date: Start date and end date are options used to filter data from or until a certain date. In the image above for example, the data would be exported if it had a date between 10/08/2019 05:21PM and 11/08/2019 04:21PM.

  • Columns: Your data contained in the TagoIO platform has a lot of information, this option gives you the freedom to choose which information you want to export. For this you can choose Default, Complete or Custom. The Default and Complete options are predefined choices of information to export, if none of these options suits your needs, you can choose the Custom option and select exactly which information you want to export.

Keep in mind that the limit of data that will be downloaded from the export function is 10,000 data points (value). If more more data need to be exported, use the API’s is a good option.

Try to test these options and export your data from TagoIO platform. If you have any questions about export data, reply to this post and I will be happy to help you!

@Michael Drexl

Hello kelvinwelter,

Thanks for this guide. The export via this guide works, but I was wonder if we could also generate an automatic rule for this? For example, every month.
I guess this would be the easiest way for what I would like to do.

I am using analysis in combination with an action described in this tutorial.
How to generate CSV reports using TagoIO

It doesn’t work as expected so far. I set the start date to 1 month, and I only receive one week of data.
This one week of data has only 6270 data points so the qty. shouldn’t be a problem.
I increased the qty and I also set the start date back to 1 year, but I get the same result.

@Graeme Rae

Can you explain how to use the API to export a complete bucket? We are retiring a bucket and want to download the entire set of variables and values that has WAY more than 10k points.

@Fabiano Eger

hi @graemerae you can export from API data using “TagoIO Data streaming”. See full details here: Device | TagoIO SDK for JavaScript and TypeScript

First - the link above is incorrect. Should be: (capital (D)device)

Second - for anyone else wanting here’s my code. It’s not pretty, and not annotated, but it dumps a single variable into a massive json blob.

const util = require(‘util’);
util.inspect.defaultOptions.maxArrayLength = null;
const { Device } = require(“@tago-io/sdk”);
const myDevice = new Device({ token: “041XXX-XXXX-XXXX-XXXX-XXXXXXXXee0” });
async function StreamMyData(){
for await (const items of myDevice.getDataStreaming({variable: “sonar”})) {
console.log(items);
}
}
StreamMyData();

I’m no longer finding “Export Data” function. Isn’t it available anymore?

SDK has a method copyChunk, follow the link to help you.

https://js.sdk.tago.io/classes/_internal_.Devices.html#copyChunk