Problems uploading data from CSV autodesk forge

Viewed 47

Good Morning, I'm using Forge Autodesk Data visualization API. I'm trying to upload the CSV data that is exactly in this format https://github.com/Autodesk-Forge/forge-dataviz-iot-reference-app/blob/main/server/gateways/csv/Hyperion-1.csv, but what i get is internal error 500

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
 Hyperion.Data.Adapter.js?73b8:543 
    
SyntaxError: Unexpected token s in JSON at position 0 Hyperion.Data.Adapter.js?73b8:543 
eval    @   Hyperion.Data.Adapter.js?73b8:543

It could be tha the problem is in the format of the csv file? this are my enviromental variables setted:

ADAPTER_TYPE= csv 
CSV_MODEL_JSON=server\gateways\synthetic-data\device-models.json
CSV_DEVICE_JSON=server\gateways\synthetic-data\devices.json
CSV_FOLDER=server\gateways\csv
CSV_DATA_START=  #Format: YYYY-MM-DDTHH:MM:SS.000Z
CSV_DATA_END=  #Format: YYYY-MM-DDTHH:MM:SS.000Z
CSV_DELIMITER="\t"
CSV_LINE_BREAK="\n"
CSV_TIMESTAMP_COLUMN="time"
CSV_FILE_EXTENSION=".csv"
    

this is the code i'm using https://github.com/Autodesk-Forge/forge-dataviz-iot-reference-app

1 Answers

I have just answered a similar question here: Setting up a CSV Data Adapter locally. When you follow the steps listed in the answer the sample app should read the CSV data without problems.

Related