Data Integration

 View Only
  • 1.  Processing JSON - Best Practices

    Posted Fri June 25, 2021 05:04 PM
    Does anyone have any techniques or guidance on the best ways to process JSON within DataStage?  I am looking for best practices for parsing and manipulating JSON.

    ------------------------------
    Daniel Toczala
    Community Leader and Customer Success Manager - Watson
    dtoczala@us.ibm.com
    ------------------------------

    #DataIntegration


  • 2.  RE: Processing JSON - Best Practices

    Posted Tue June 29, 2021 09:23 AM
    Parsing JSON in DataStage means using the Hierarchical Stage, which can be problematic right now.  The Hierarchical Stage was the one part of DataStage that was written in Adobe Flash.  Flash of course, is no longer supported and has been uninstalled at most companies due to the security risks.    For more on this:

    IBM: Hierarchical Data stage: Flash player end of support in Dec 2020

    However, assuming you've gotten the issue resolved using one of the methods in that post, the biggest issue is you must have a valid schema file for the Hierarchical Stage to work.  If you don't have a schema file, there are some freebie tools online that will parse a sample JSON file and create a schema.  Just make sure its a sample that is truly representative of your most complex elements.

    Other than that, the guidelines for creating JSON files are the same no matter what tool you use, so googling any of the public links can provide do's and don'ts, for example:

    https://medium.com/analytics-vidhya/json-best-practices-d8270f6b8e17 

    If you are looking for DataStage examples, there's actually some decent basic-level examples online:

    Information Server: Example 1: Parsing JSON data

    ------------------------------
    Andy Sorrell
    ------------------------------