We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

Parsing Jsons from d360 rest api

Comments

3 comments

  • Avatar
    Adrian Williams

    The addtibutes, firstName,lastName and emailAddress elements were added to a user's profile in a relatively recent release. It looks like that data flow has not been modified to handle the presence of the additional fields.

    You can modify the script in the 'Parse Json' Transform node's ConfigureFields property so that they are handled correctly by inserting the following lines:

    out1.attributes=unicode
    out1.firstName=unicode
    out1.lastName=unicode
    out1.emailAddress=unicode

     

    The above changes have been made in the attached data flow.

     

    Attached files

    D3SA_List_Users_367 - 3 Feb 2021.lna

     

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    The JSON Data node does not output a field when all of the values of a particular attribute are null.

    0
    Comment actions Permalink
  • Avatar
    Jurgen van Tiggelen

    Adrian Williams Thank's a lot for this info! Good to know that the JSON Data node ignores attributes if they are all null.

    Regarding the Transform node, i actualy tried to do this but got an error. I get the same if i run the model you've attached. It says: 

    java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unknown type: dict Error executing "ProcessRecords" at line "10"

    I assume its having problems saving a null into unicode but cant tell for sure (very new to both d360 and python)

     

    0
    Comment actions Permalink

Please sign in to leave a comment.