Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Help needed: Dynamically flattening nested JSON into Cognos reports

    Posted 21 days ago
    Hi Analytics Community,

    In my previous discussion I asked how to parse nested JSON fields and map them into Cognos report columns. While helpful suggestions were provided I'm still unable to get the dynamic nesting to work reliably across all my datasets.

    Does anyone have a proven technique or sample package that demonstrates:
    • Reading dynamic, arbitrarily nested JSON structures
    • Dynamically flattening them into a tabular format
    • Automating the process for large, evolving JSON feeds

    I'd greatly appreciate example code snippets, model design patterns, or recommendations for useful extensions. Let me know if more details about my use case are needed.

    Thanks for any assistance you can provide!


  • 2.  RE: Help needed: Dynamically flattening nested JSON into Cognos reports

    Posted 20 days ago
    Edited by Patrick Neveu 20 days ago

    Hi,

    For this demo, I use data from https://dogapi.dog (I'm not related to this website, and it is free to use).

    You need to create a data server connection.

    In this demo, I've created a DogAPI connection based on Progress DataDirect Autonomous REST (connection type):

    In the JDBC URL, you need to use (Sample IS important below):

    jdbc:ibmcognos:autorest:Sample=https://dogapi.dog/api/v2/facts?limit=5

    Click on test the connection button, you should see: Test connection successful.

    Save the DogAPI connection and click Close.

    In the following screen, click on Assets:

    From the AUTOREST line, click on Load.

    Click Done to close the asset window.

    Create a new data module based on DogAPI, using AUTOREST:

    Click Select tables.

    In this sample, I add API V 2 Facts.

    Now, I have the following screen:

    I can save the data module and create a report based on DogAPI connection.

    Note: I don't know where is your previous discussion?

    Best regards,



    ------------------------------
    Patrick Neveu
    BSL Consulting
    IBM Champion
    ------------------------------