Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-17922

Complex workunit results not entirely rendered in ECL Watch

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4.0
    • Fix Version/s: 6.4.0
    • Component/s: EclWatch
    • Labels:
      None

      Description

      Example using a data structure from another project:

      IMPORT Std;
      
      //------------------------------------------------------------------------------
      
      ThreeDCoordinateRecord := RECORD
          DECIMAL5_3              x                           {XPATH('x')};
          DECIMAL5_3              y                           {XPATH('y')};
          DECIMAL5_3              z                           {XPATH('z')};
      END;
      
      GPSRecord := RECORD
          DECIMAL9_6              latitude                    {XPATH('latitude')};
          DECIMAL9_6              longitude                   {XPATH('longitude')};
      END;
      
      WifiRecord := RECORD
          STRING                  id                          {XPATH('id')};
          STRING                  value                       {XPATH('value')};
      END;
      
      RawDataRecord := RECORD
          DECIMAL6_3              ambientTemp                 {XPATH('ambientTemp')};
          DECIMAL5_2              barometer                   {XPATH('barometer')};
          DECIMAL6_3              batteryLevelPercentage      {XPATH('batteryLevelPercentage')};
          DECIMAL4_2              bodyTemp                    {XPATH('bodyTemp')};
          DECIMAL5_3              coLevel                     {XPATH('coLevel')};
          DECIMAL6_3              forceSensitiveResistance    {XPATH('forceSensitiveResistance')};
          UNSIGNED2               heartRate                   {XPATH('heartRate')};
      END;
      
      ContextualDataRecord := RECORD
          ThreeDCoordinateRecord  accelerometer               {XPATH('accelerometer')};
          GPSRecord               gps                         {XPATH('gps')};
          ThreeDCoordinateRecord  gyroscope                   {XPATH('gyroscope')};
          ThreeDCoordinateRecord  magneticfield               {XPATH('magneticfield')};
          DATASET(WifiRecord)     wifi                        {XPATH('wifi')};
      END;
      
      LocationDataRecord := RECORD
          ThreeDCoordinateRecord;
          STRING                  zoneID                      {XPATH('zoneId')};
      END;
      
      HeaderRecord := RECORD
          STRING                  msgtype                     {XPATH('msgtype')};
          STRING                  thePriority                 {XPATH('priority')};
      END;
      
      EventRecord := RECORD
          ContextualDataRecord    contextualData              {XPATH('contextualData')};
          STRING                  eventID                     {XPATH('eventId')};
          BOOLEAN                 isEventStatus               {XPATH('eventStatus')};
          STRING                  guid                        {XPATH('guid')};
          BOOLEAN                 isStaleData                 {XPATH('isStaleData')};
          LocationDataRecord      locationData                {XPATH('locationData')};
          RawDataRecord           rawData                     {XPATH('rawData')};
          UNSIGNED4               sequence                    {XPATH('sequence')};
          STRING                  timestamp                   {XPATH('timestamp')};
      END;
      
      EventWrapper := RECORD
          EventRecord             theEvent                    {XPATH('event')};
          HeaderRecord            theHeader                   {XPATH('header')};
      END;
      
      Raw_Layout := RECORD
          BOOLEAN                 isCompressed                {XPATH('compressed')};
          EventWrapper            d                           {XPATH('d')};
      END;
      
      ETL_Layout := RECORD
          Raw_Layout;
          Std.Date.Timestamp_t    deviceTimestamp             {XPATH('deviceTimestamp')};
      END;
      
      Parsed_Layout := RECORD
          Std.Date.Timestamp_t    receivedTimestamp           {XPATH('receivedTimestamp')};
          UNSIGNED4               roxieNodeNum                {XPATH('roxieNodeNum')};
          UNSIGNED4               roxieThreadID               {XPATH('roxieThreadID')};
          STRING40                deviceID                    {XPATH('deviceID')};
          ETL_Layout              message                     {XPATH('message')};
      END;
      
      //------------------------------------------------------------------------------
      
      wifiData := DATASET
          (
              5,
              TRANSFORM
                  (
                      WifiRecord,
                      SELF.id := (STRING)COUNTER,
                      SELF.value := (STRING)COUNTER
                  )
          );
      
      ds := DATASET
          (
              1,
              TRANSFORM
                  (
                      Parsed_Layout,
                      SELF.message.d.theEvent.contextualData.wifi := wifiData,
                      SELF := []
                  )
          );
      
      OUTPUT(ds, NAMED('All'));
      OUTPUT(ds[1].message, NAMED('message'));
      OUTPUT(ds[1].message.d, NAMED('d'));
      OUTPUT(ds[1].message.d.theEvent, NAMED('theEvent'));
      OUTPUT(ds[1].message.d.theEvent.contextualData, NAMED('contextualData'));
      OUTPUT(ds[1].message.d.theEvent.contextualData.wifi, NAMED('wifi'));
      

      After running this code, only the result named 'wifi' will actually show the values for the individual attributes within the 'wifi' child dataset. In all other results that area is blank.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gordonsmith Gordon Smith
                Reporter:
                dcamper Dan S. Camper
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: