Data360 Analyze

 View Only
  • 1.  Processing WDDX response

    Employee
    Posted 06-23-2021 07:28

    Am consuming an API using http node. The response is returned in a WDDX format. I am trying to associate an array within the data i.e. invoice header to associated invoice lines. But there is no reference to the invoice # in the invoice lines data.

    My XML response is attached. Any one able to give some guidance please.

    Thanks

    Martin

     

    Attached files

    SAMPLEXML.xml

     



  • 2.  RE: Processing WDDX response

    Employee
    Posted 06-23-2021 07:48

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Perhaps I'm not interpreting your issue correctly, but here's what I did. I parsed your XML file with the XML Data node (I didn't need to change anything from the default configuration). I filtered on wddxPacket.data.struct.var.array.struct.var.name field where it's equal to invoice_no and I see the value for invoice_no in wddxPacket.data.struct.var.array.struct.var.number.



  • 3.  RE: Processing WDDX response

    Employee
    Posted 06-24-2021 01:37

    Hi Gerry

    I am ok with filtering but what I am unable to do is associate the all_invoice_line_m records with the Invoice_no. The problem is associating the cascading records within the xml. Normal xml I think i could use an xpath expression to link the 2 (never done it but have reads its possible.

    So what i would be looking for is the following output so I can link the invoice_ no to the invoice line items so i can pivot the data to output into excel in a tabular format.

    Thanks

    Martin



  • 4.  RE: Processing WDDX response

    Employee
    Posted 07-02-2021 04:36

    Hi 

    is anyone able to provide guidence on this question?

    Thanks

    Martin



  • 5.  RE: Processing WDDX response

    Employee
    Posted 07-06-2021 10:32

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Hi Martin, do you just want the invoice number value in it's own column down all the preceding rows? You could do this with a Transform node and the following code 

    if node.firstExec:
    inv_no = Null

    if in1['wddxPacket.data.struct.var.array.struct.var.name'] == 'invoice_no':
    inv_no = in1['wddxPacket.data.struct.var.array.struct.var.number']

    out1.invoice_no = inv_no



  • 6.  RE: Processing WDDX response

    Employee
    Posted 07-07-2021 02:46

    Here is pretty much the same solution as Gerry described. Adding a new output pin for the data structure and removing the common prefixes simplifies the field names a bit:

     

     

    Attached files

    Processing_WDDX_Response - 7 Jul 2021.lna