Skip to content

CSV Import Agent: short description

Igor Rutka edited this page Jul 31, 2023 · 2 revisions

Steps

  1. Create a table in your spreadsheet with all the assets and their values following the format of the table below
  2. Export your spreadsheet to a CSV file (.csv)
  3. Import the CSV file in OpenRemote using the: CSV Import Agent

Table format for spreadsheet:

  EXCLUDE                    
ATTRIBUTE_NAME   string1 boolean1 integer1 integer2 integer3 double1 double2 double3 LATITUDE LONGITUDE
VALUE_TYPE   TEXT BOOLEAN INTEGER POSITIVE_INTEGER NEGATIVE_INTEGER NUMBER POSITIVE_NUMBER NEGATIVE_NUMBER GEO_JSON_POINT GEO_JSON_POINT
    light1 true 5 4 -3 1.0 2.3 -4.1 51.445977 5.454178
    light2 false 10 2 -15 1.2 20.1 -1.2 51.445981 5.454182
EXCLUDE This is a template for the CSV Import Agent                    
EXCLUDE All currently available keywords are in capital letters                    

Keywords

Keyword Description
ATTRIBUTE_NAME Attribute name can only contain letters and numbers without spaces. Example: assetId
VALUE_TYPE Default value type is TEXT (String)
EXCLUDE Use EXCLUDE in the first column/row if you don't want to import the column/row
LATITUDE Indicates to the CSV Import Agent that you want to use this column as latitude coordinate on the map. Must be specified in the ATTRIBUTE_NAME row
LONGITUDE Indicates to the CSV Import Agent that you want to use this column as longitude coordinate on the map. Must be specified in the ATTRIBUTE_NAME row
Value type Example
TEXT name
BOOLEAN true
INTEGER 2
POSITIVE_INTEGER 3
NEGATIVE_INTEGER -1
NUMBER 1.0
POSITIVE_NUMBER 3.4
NEGATIVE_NUMBER -2.5
GEO_JSON_POINT 51.4301

Using the CSV Import Agent

  1. Select your Asset Type. Default: Thing asset
  2. Enter column number that contains your asset names. Default: 0, means no column is selected, the CSV Import Agent will generate unique asset names
  3. Enter the delimiter used in your CSV file. Default: ","
  4. Browse for your CSV file. (On Mac, you must click Options and select "All Files" under "Format" to select the CSV file)
  5. Upload the CSV file. Check the Info field or the logs for more information about your import. (Ignore the popup messages, these are incorrect and need to be updated in the future)
Clone this wiki locally