Data Management

The data management service is a robust solution for smart machine data handling, data capture, and cloud synchronization. Using the data management service, you can collect data from different parts of a robot, IoT device, or any other machine. Once collected, you can configure which data to securely sync to the cloud, and view, sort, or manage it directly in the cloud without needing to manually gather data from each machine.

Overview

Data is captured on the machine, uploaded to the cloud, and then deleted off local storage.

Viam’s data management features can be broken down into on-device and cloud data capabilities:

On-device data management

Manage data directly on your robot, with configurable data capture from various components, automated recovery after interruptions, and secure cloud synchronization for efficient data storage and management.

Cloud data management

Experience streamlined data handling with advanced querying, viewing, and filtering capabilities, along with efficient data labeling and exporting tools.

Get started

Collect your data and send to the Viam platform

You must configure data capture and cloud sync with the data management service to be able to view, label, and export data.

Used with

You can configure the frequency of data capture individually for each supported component:

Query your data

Once you have synced, you can query the data you’ve collected in multiple ways, including through the data client API or inside the Viam app. For tabular sensor data, you can run SQL or MQL queries against your synced data from the Query subtab of the Data tab in the Viam app.

Permissions

Data management permissions vary between owners and operators. For more information about who can do what with data, see Data Permissions.

API

The data management service supports the following methods:

Method NameDescription
SyncSync data stored on the machine to the cloud.

The data client API supports a separate set of methods that allow you to upload and export data to and from the Viam app. For information about that API, see Data Client API.

Sync

Sync data stored on the machine to the cloud.

Parameters:

  • ctx (Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
  • extra (map[string]interface{}): Extra options to pass to the underlying RPC call.

Returns:

  • (error): An error, if one occurred.

For more information, see the Go SDK Docs.

data, err := datamanager.FromRobot(robot, "my_data_service")

// Sync data stored on the machine to the cloud.
err := data.Sync(context.Background(), nil)

Next steps: train and deploy machine learning

You can use data synced to the cloud to train machine learning models and then deploy these models to your machines from the Viam app.

For a comprehensive tutorial on using data capture and synchronization together with the ML model service, see: