IBM Support

JSON_TABLE() table function



The JSON_TABLE() table function has been added to Db2 for i.


You are in: IBM i Technology Updates > Db2 for i - Technology UpdatesDb2 for i Functional Enhancements >  JSON_TABLE() table function

The JSON_TABLE table function returns a result table from the evaluation of SQL/JSON path expressions. Each item in the result sequence of the row SQL/JSON path expression represents one or many rows in the result table.

Enhanced with IBM i 7.4 SF99704 Level 7 and IBM i 7.3 SF99703 Level 18:
  1. Many JSON feeds publish JSON in the form of a JSON array.
    JSON_TABLE is used to shred JSON documents, and has been extended to also support direct shredding of JSON arrays.

Failure when trying to use JSON_TABLE against a JSON array

JSON_TABLE successfully consuming a JSON array

See the SQL Reference for details: JSON_TABLE table function

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
11 April 2020