Example: Select JSON Data from QryLogParamJSON - Advanced SQL Engine - Teradata Database

Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
prb1610499325399.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1092
lifecycle
previous
Product Category
Teradata Vantageā„¢

This example assumes the PARAMINFO option is enabled in the BEGIN/REPLACE QUERY LOGGING statement. The SELECT statement selects data from QryLogParamJSON and converts all rows in the DBC.DBQLParamTbl table to a JSON document.

Run this query from BTEQ with width set to 500.

.width 500;
select QueryID, RowNum, ParamJSON from QryLogParamJSON;

Result:

QueryID            RowNum ParamJSON
------------------ ------ -------------------------------------------------------------
307190733539634351 1      {"QueryID":"307190733539634351","HostCharSet":"127",
                          "ParamInfo":[{"Name":"x","Type":"INTEGER","Size":4,
                          "Position":1}]}
307190733539634351 2      {"QueryID":"307190733539634351","Data Record":{"x":"10"}}