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

Published Roxie Query's Response in JSON / XML format missing field with empty values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Not specified
    • Resolution: Invalid
    • Affects Version/s: 5.4.6
    • Fix Version/s: None
    • Component/s: WS-ECL
    • Labels:
      None
    • Environment:
      Ecl IDE 5.4.6 and WSECL3.0

      Description

      I am trying to develop a UI app which accesses Roxie Query published in HPCC to get data filtered by my input values.

      Issue is : The response from ROXIE query execution does not give me fields of dataset if they do not have values in all the records of result.

      Below is my Roxie Query

      import STD;
      EXPORT FetchResultByValA() := FUNCTION
      val_A := '1' : STORED('aValue');
      DataRec := RECORD
      STRING a;
      STRING b;
      STRING c;
      END;
      ds := DATASET
      (
      [

      {'1', '2', '3'}

      ,

      {'4', '', '6'}

      ,

      {'5', '8', ''}

      ],
      DataRec
      );
      RETURN OUTPUT(ds(a = val_A));
      end;

      when i access this from WS-ECL in JSON format it prompts me to input the aValue

      when i input as 1

      the result is :

      {"fetchresultbyvalaResponse": {"sequence": 0, "Results": {"result_1": {"Row": [

      {"a": "1", "b": "2", "c": "3"}

      ]}}}}

      when I input as 5 :

      the result is :
      {"fetchresultbyvalaResponse": {"sequence": 0, "Results": {"result_1": {"Row": [

      {"a": "5", "b": "8"}

      ]}}}}

      when i check both results i am missing the variable C in the latter due to the field is empty. this issue applies to XML format of response.

      This makes me as unaware of the variable C presents. If I access this query with both inputs in OUTPUT TABLE format, that gives me all the fields with out missing.

      As a user from outside HPCC, if validate the response XML with XSD i will fail in one case.

      I would like to have all fields of resultset irrespective they are empty. Please share your suggestions or ideas

      Regards,
      Raja

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rajasundarrajan raja
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: