Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi All,
I have a doubt, I do not figure out where the data is saved once imported a .json file using the following mask:
Every time i can read "Importing..." and " Successful", so I don't think it is an import problem but only a problem to figuring out where is saved the imported file.
Can someone kindly help me understand?
Thanks in advance.
Marco - Manticle Group - Milan(IT)
Hi Marco,
If you are importing data from a json file (as opposed to entities from a XML file) you need to check the data radio box. By default this is set to the entities radio box. The data is then imported to particular datatable or stream etc. that it was exported from originally.
HTH,
Debi Reese
ThingWorx
Which data table? or which stream? it has got the same name of the json?
Thanks
Marco P.
My assumption is that your json file was created by doing an export from ThingWorx. Is this valid? (By default the json file will be named Data.json or it could also include a date time stamp if exported to ThingworxStorage). If so, what ever datatable and stream was selected during export is the same datatable or stream name for the import. You can open the json file in notepad to view the details of the name, datashape etc.
Debi
ThingWorx
No is not valid. we have raw data in json format that i would like to import in the Thingworx platform by the import button of the composer.
After that i would like work on it linking json data to a thing, to a mashup object (menu, chart..), doing some machine learning stuff and only at the end of this process exporting the data out of thingworx platform.
the json imported could be in the ThingworxStorage?
Thanks
You can import your json file to ThingWorx file repository, and then add a custom service to parse and have the data inside TWX platform.
With B/R,
Praveen.B
For a data export out of Thingworx, you actually get a JSON Stream.
The first line describes the version of Thingworx which exported it.
Then, you have an Entity reference (just the Entity Name and Entity Type), followed by data entries for that entity.
You can have more than one of these Entity+Data sequences.
The last line is just an object with property 'end' set to 'true'.
Here's an example data export for a DataTable named MyTable, with two rows:
{"schemaVersion":"803","build":"b3","start":true,"majorVersion":"6","minorVersion":"0","revision":"9"}
{"name":"MyTable","type":"DataTable"}
{"sourceType":"MyTable","values":{"guid":"31c04422-cd2b-4b17-85db-359da8f2ee0f","value":"abc"},"location":"0.0,0.0,0.0","source":"MyTable","id":"1093722","containerID":"25899","key":"31c04422-cd2b-4b17-85db-359da8f2ee0f","timestamp":1461019833653,"tags":[]}
{"sourceType":"MyTable","values":{"guid":"781ca725-b9cc-4fac-a519-da7a72074c84","value":"def"},"location":"0.0,0.0,0.0","source":"MyTable","id":"2370790","containerID":"25899","key":"781ca725-b9cc-4fac-a519-da7a72074c84","timestamp":1461771549273,"tags":[]}
{"end":true}
Importing this file would write two rows to the MyTable DataTable. If the table doesn't exist, or the DataShape doesn't match, then the import would fail.