Skip to main content
1-Visitor
April 29, 2016
Question

How can i import the CSV or JSON file in Thingworx and put in a Data Table?

  • April 29, 2016
  • 1 reply
  • 16520 views

How can i import the CSV or JSON file in Thingworx and put in a Data Table?

How can i import a CSV JSON file? I tried to the import button (data radio button) it told me that was imported successful the file. But where is imported?

How can i work on it with things, shape thing or template thing?

Thanks in advance!

1 reply

1-Visitor
May 4, 2016

any infos?

1-Visitor
May 5, 2016

The import functionality expects a file which was exported by a Thingworx server; it won't handle an arbitrary CSV or JSON file..

If you want to import CSV data, you'll have to create a DataShape which matches the CSV content, create a DataTable or Stream which uses that DataShape, and then you have to provide the CSV data to a Service which will parse the data and insert it into the DataTable or Stream.

There are many ways to accomplish this last step, so it depends on your environment and system. You could use a FileRepository to store the file, or you can have a Mashup with a big TextArea that you can paste the CSV data into, or you could have the CSV file an HTTP server and use the ContentLoader Resource to download the CSV data. There are probably other ways, as well.

1-Visitor
May 11, 2016

Thank you!

I create a Data table and a data shape as you suggest, bu ti do not know which service choose to populate my data table with csv data!

Schermata 2016-05-11 alle 14.05.18.png

i put also the csv in the repository

Schermata 2016-05-11 alle 14.06.21.png

I find out, also the extension CSV Parser , i need this extension or there is a service?

Thank you