Skip to main content
14-Alexandrite
October 7, 2022
Solved

Read csv files into thingworx

  • October 7, 2022
  • 2 replies
  • 3120 views

We have scenario where we have data stored in csv files stored in local computer and we need to read the data into thingworx which is present in cloud. we then have to visualize the data loaded into thingworx from csv in a mashups.

 

Any leads on how we can achieve it. we also have kepware where we can use simulators to read csv files to a tag and then read the data from the tag. But is it possible to read files directly into thingworx without interacting with kepware.

Best answer by nmutter

You could create

- a TWX agent which will upload the files to ThingWorx e.g. with the Java SDK c_javasdk_sdk_file_transfers.html . But this is some work.

- a script which calls REST-API of thingworx which uploads a file

Can the machine/local computer:

- connect to the TWX instance directly? Or only via Kepware 'proxy'?

- execute custom executables?

 

I'm not sure how to do it nicely via Kepware.

2 replies

17-Peridot
October 7, 2022

If thingworx server able to reach local computer then you can try following,

  1. FTP
  2. SMB/NFS - Windows or Linux Fileshare over the network
14-Alexandrite
October 7, 2022

No, our thingworx is on cloud and file is on local network secured using firewall. and we are not able to reach local computer from thingworx.

16-Pearl
October 8, 2022

If doing it manually is fine:

  1. Create mashup with FileUpload widget
  2. Let user upload the csv file to a FileRepository via the mashup
  3. On upload complete call a service in TWX using CSV Parser to read the csv
  4. somehow transform the data for your mashup to visualize it (not clear what visualization u need)
14-Alexandrite
October 9, 2022

The files are generated automatically using a software frequently and periodically so it is not feasible for the user to upload the files manually to FileRepository.

Also the thingworx server is on cloud and csv files are generated in a machine located in the organisation network..

nmutter16-PearlAnswer
16-Pearl
October 10, 2022

You could create

- a TWX agent which will upload the files to ThingWorx e.g. with the Java SDK c_javasdk_sdk_file_transfers.html . But this is some work.

- a script which calls REST-API of thingworx which uploads a file

Can the machine/local computer:

- connect to the TWX instance directly? Or only via Kepware 'proxy'?

- execute custom executables?

 

I'm not sure how to do it nicely via Kepware.