6 Replies Latest reply on May 8, 2016 2:25 AM by preddy-2 RSS
    mdipaola Newbie

    Where data is physically stored once imported?

    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:

    Schermata 2016-04-28 alle 12.11.47.png

    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.

    Schermata 2016-04-28 alle 12.16.47.png

     

    Can someone kindly help me understand?

     

     

    Thanks in advance.

    Marco - Manticle Group - Milan(IT)

      • Re: Where data is physically stored once imported?
        dreese Newbie

        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

          • Re: Where data is physically stored once imported?
            mpagliotta Apprentice

            Which data table? or which stream? it has got the same name of the json?

             

            Thanks

             

            Marco P.

              • Re: Where data is physically stored once imported?
                dreese Newbie

                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

                • Re: Where data is physically stored once imported?
                  chadha Apprentice

                  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.