17.00 - Example: Extract JSON Name/Value Pairs from the JSON Document - Teradata Database

Teradata Vantage™ - Data Dictionary

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Administration
Programming Reference
featnum
B035-1092-170K

This example selects particular name/value pairs from the JSON document using JSON string syntax. If a row does not have a specific name requested, null is returned.

select QueryID, RowNum, ParamJSON."Data Record" from QryLogParamJSON;

Result:

QueryID              RowNum   ParamJSON.Data Record
------------------   ------   ---------------------
307190733539634351   1        ?
307190733539634351   2        {"x":"10"}