3 Replies Latest reply on Jun 10, 2016 12:30 PM by dvelasquez RSS
    dvelasquez Newbie

    Storing Data in Data Table (timestamp problem)

    Hi,

     

    I wish to every 1 second add a row into a data table (I already created a data shape and I have 23 columns) in order to export them later and manipulate the data.

     

    The problem is I don´t know which service use or how to add them every 1 second.

     

    I Tried using Add Data Table Entries but the timestamp is not working well.

     

    PreguntaThing.JPG

    Is always showing a 00:00 and I don´t know why

     

    Thank You

      • Re: Storing Data in Data Table
        carlesc Ninja

        Hi David,

         

        00:00 --> hours:minutes --> On this format there's no seconds to show, maybe you have it on every second but you don't see it.

         

        If you want to trigger a add data table entry every second, you can use  a Timer thing configured to trigger an event every second, and subscribe to that timer event and add the data table entry.

         

        But, if you want to add an entry every second for a long time, DataTables are not the Data Store mechanism to go, betters you go to a Stream thing. DataTables are meant to store about 100k registers and in this frequency you will reach it fast.

         

         

        Carles.

        • Re: Storing Data in Data Table (timestamp problem)
          ianban Creator

          Hi

           

          +1 to Carlos' advice above.

           

          There's a substantial performance difference between Streams and Data Tables. Streams are written asynchronously, data to be persisted in a stream goes into a queue and is processed from the queue. Data Tables are written synchronously. The system effectively stops and waits for the data to be written, if you're trying to put large amounts of data into a Data Table, it's relatively easy to start negatively impacting system performance.

           

          The "AddStreamEntry" code snippet creates a timestamp for you and persists that in the timestamp column that is part of the default set of fields for a Stream object.

           

          Hope this helps

           

          Regards

           

          Ian