Data360 Analyze

 View Only
  • 1.  JSON field names - renaming

    Employee
    Posted 02-05-2019 04:26

    Hi - I have the JSON acquisition node quite happily reading a JSON file but is there a way on the node to remove the prefixed field names e.g.

     

    The columns being read in are prefixed as follows:

    Input Field Name
    envelopes.billingMedia.id
    envelopes.billingMedia.description
    envelopes.isCopy
    envelopes.isMarketingExcluded
    envelopes.postalAddress.title
    envelopes.postalAddress.foreName
    envelopes.postalAddress.surname
    envelopes.postalAddress.postCode
    envelopes.postalAddress.addressLines.line
    envelopes.statements.statementId
    envelopes.statements.statementDate
    envelopes.statements.accountNumber
    envelopes.statements.totalAmountDue
    envelopes.statements.accounts.accountId
    envelopes.statements.accounts.previousClosingBalance
    envelopes.statements.accounts.openingBalance

    Is there a way to remove the envelopes prefix or would I have to do a transform node to rename the columns?

    Thanks

    Martin



  • 2.  RE: JSON field names - renaming

    Employee
    Posted 02-05-2019 05:04

    Hi Martin,

     

    you could set the 'RemoveCommonPrefixes' property in the Optional section of the node's properties to True.

     

    Regards,

    Adrian



  • 3.  RE: JSON field names - renaming

    Employee
    Posted 02-05-2019 05:28

    Hi Adrian - didnt seem to work. Think this could be that some of the fields dont have the prefix e.g,

     

    Input Field Name
    callCentreContactEmail
    callCentreWebAddress
    callCentreOpeningHours
    envelopes.billingMedia.id
    envelopes.billingMedia.description
    envelopes.isCopy
    envelopes.isMarketingExcluded
    envelopes.postalAddress.title

     

    Thanks

    Martin



  • 4.  RE: JSON field names - renaming

    Employee
    Posted 02-05-2019 06:13

    Yes, all the fields must have the common prefix (except for the refId fields).

    You could output all the envelopes.* fields to a separate output pin (switch to the Define tab in the properties and, at the end of the property list, add a new output called envelopes). The node would then remove all of the common prefixes for the fields output to the envelopes pin.

    Note that you must ensure that records are output to the data pin else you will get a node execution error.

    Regards,

    Adrian



  • 5.  RE: JSON field names - renaming

    Employee
    Posted 02-05-2019 06:58

    that worked, thanks adrian