Export Data
Download machine data to your computer with the Viam CLI or data client API.
Export data with the Viam CLI
To export your synced data using the Viam CLI, first install the Viam CLI and authenticate to Viam.
Then, to export data from the data management service in the cloud:
Navigate to the DATA page in the Viam app.
Below the SEARCH button in the Filtering panel, click Copy Export Command to copy the export command to the clipboard.
Run the copied command in a terminal:
viam data export --org-ids=<org-id> --data-type=binary --mime-types=<mime types> --destination=.
This command uses the Viam CLI to download the data locally onto your computer based on the search criteria you select in the Viam app.
By default, the command creates a new directory named
data
in the current directory and downloads the specified data. If you want to store the data in a different location, change the specified folder with the--destination
flag.Once the command has finished running and downloading the data, you can view and use the data locally.
Since data is downloaded in parallel, the order is not guaranteed. Sort your folder by filename in order to see them in chronological order.
You can see more information about exporting data in the Viam CLI documentation.
Manage data with the data client API
A set of methods using the data client API for managing data, including export, batch delete, tag, and upload functions, are provided in the Python SDK.
The following methods are supported by the data client API:
Method Name | Description |
---|---|
TabularDataByFilter | Filter and download tabular data. |
BinaryDataByFilter | Filter and download binary data. |
BinaryDataByIDs | Download binary data by IDs. |
DeleteTabularData | Delete tabular data older than a specified number of days. |
DeleteBinaryDataByFilter | Filter and delete binary data. |
DeleteBinaryDataByIds | Filter and delete binary data by ids. |
AddTagsToBinaryDataByIds | Add tags to binary data by ids. |
AddTagsToBinaryDataByFilter | Add tags to binary data by filter. |
RemoveTagsFromBinaryDataByIds | Remove tags from binary data by ids. |
RemoveTagsFromBinaryDataByFilter | Remove tags from binary data by filter. |
TagsByFilter | Get tags from data by filter. |
BoundingBoxLabelsByFilter | Get a list of bounding box labels using a Filter. |
GetDatabaseConnection | Get a connection to access a MongoDB Atlas Data federation instance. |
BinaryDataCaptureUpload | Upload binary data collected on your machine through a specific component and the relevant metadata to the Viam app. |
TabularDataCaptureUpload | Upload tabular data collected on your machine through a specific component and the relevant metadata to the Viam app. |
StreamingDataCaptureUpload | Upload the contents of streaming binary data and the relevant metadata to the Viam app. |
FileUpload | Upload file data stored on your machine and the relevant metadata to the Viam app. |
FileUploadFromPath | Upload file data stored on your machine from the specified filepath and the relevant metadata to the Viam app. |
AddBoundingBoxToImageById | Add a bounding box to an image specified by its BinaryID. |
RemoveBoundingBoxFromImageById | Removes a bounding box from an image specified by its BinaryID. |
CreateDataset | Create a new dataset. |
ListDatasetByIds | Get a list of datasets using their IDs. |
ListDatasetByOrganizationId | Get the datasets in an organization. |
RenameDataset | Rename a dataset specified by the dataset ID. |
DeleteDataset | Delete a dataset. |
AddBinaryDataToDatasetByIds | Add the BinaryData to the provided dataset. This BinaryData will be tagged with the VIAM_DATASET_{id} label. |
RemoveBinaryDataFromDatasetByIds | Remove the BinaryData from the provided dataset. This BinaryData will lose the VIAM_DATASET_{id} tag. |
Click on the method name for more information.
Next steps
For a comprehensive tutorial on using data capture and synchronization together with the ML model service, see Capture Data and Train a Model.
Have questions, or want to meet other people working on robots? Join our Community Discord.
If you notice any issues with the documentation, feel free to file an issue or edit this file.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!