Data360 Analyze

 View Only
  • 1.  Incomplete Time Series

    Posted 06-18-2024 05:43

    Hello, i have the following problem:

    Assume i have the data set below, i would like to get a complete timeseries for the data coming in, so 12 more rows of data.

    Sometimes my time series in hours comes in incomplete.

    Is it possible to fill the time series for a specific day ? It could just be null values but the time series has to be complete.

    I know i can solves this with pandas, but i can't use that in a Transform node.

    Would appreciate some pointers



    ------------------------------
    Henrik B
    E.ON Sverige
    ------------------------------


  • 2.  RE: Incomplete Time Series

    Employee
    Posted 06-18-2024 06:55
      |   view attached

    You can use the following code in a Transform node to add further records to the existing data set. In this case the calculated values are being output in different fields so you can see what is being generated. The values for the new records increment the last received datetime (string) value by one hour in each subsequent record up to a maximum of 24. See the attached text document that has the scripts for the Transform Node's ConfigureFields script and ProcessRecords script.

    If you want to simply generate Null values in the new records then you can modify the code that is generating the 'new_Timestamp_Value' value (and you can simplify the remaining script to remove the other unnecessary lines).

    There are some examples of using datetime values in the Help documentation, see the following topic:

    https://help.precisely.com/r/Data360-Analyze/3.14/en-US/Data360-Analyze-Server-Help/Migrating-from-LAE/What-s-changed/BRAINscript-to-Python/Date-time-and-datetime-functions?section=date-time-functions__datetime2



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------