To quickly add attributes in bulk, you start with a template in comma-separated values format. When you export the template from the Samsara web interface, Samsara includes all existing attributes and their unique Samsara ID. In the CSV file, you can add new attributes or modify information about your existing attributes:
-
From the Samsara dashboard, select Settings ( ) > Organization > Tags & Attributes.
- Select Attributes tab
-
Select More Actions (...) > Upload CSV.
-
Select Sample Template to start a new template without any existing data. To download your existing data, select Attributes List. Samsara exports all existing data and associated information to the CSV file. You can modify existing attributes or append new ones in the provided format. You will return to this screen later in this workflow to upload your appended CSV file.
-
Open the CSV file in a spreadsheet application of your choice.
-
If you open the file in Microsoft Excel, the application identifies the ID as a scientific number. As a result, you must first set the format for the ID column as a Number and remove any additional decimal places before saving the file. If you skip this step you will overwrite the unique ID and will need to start over with a new file.
-
Make any desired changes to your attributes and save the file. At a minimum, you must include the ID, attribute Name, Entity Type, and Attribute Values. Use the CSV Format table below to properly format your CSV file prior to upload. Additional considerations when you modify the CSV file:
-
Any changes to existing attributes (including blank or empty fields) will overwrite the definitions in Samsara upon import. Be careful in these cases to avoid accidentally overwriting existing stored data.
-
If you include a column and leave a value blank, Samsara assigns the default value for the field (typically null or blank).
-
-
Save your file and return to the Attributes page in Samsara.
-
Select More Actions (...) > Upload CSV.
-
Choose the CSV file from your computer, or drag and drop the CSV file into the window.
-
Preview to review the attributes.
-
Confirm to confirm the changes.
Note - The CSV file must contain no more than 5000 rows of data (including one row for the header).
CSV Format
The following table describes the CSV fields you can use to define your attributes:
Field |
Description |
Example |
---|---|---|
ID |
Internal ID Number of tag. This field is not editable on import since it represents an internal storage identifier. It should also be blank when creating new attributes. |
1 |
Name |
The name of the attribute. This field is required. |
License Type |
Entity Type |
The type of entities that this attribute can be applied to. Value will be either "Driver" or "Asset". This field is required. |
Driver |
Attribute Values |
The possible values for the attribute. Multiple values must be comma separated. This field is required. |
Class A, Class B, Class C |
Comments
0 comments
Please sign in to leave a comment.