Advantages of JSON_PUBLISH Over JSON_AGG and JSON_COMPOSE - Advanced SQL Engine - Teradata Database

JSON Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
gzn1554761068186.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1150
lifecycle
previous
Product Category
Teradata Vantageā„¢
The JSON_PUBLISH table operator combines the functionality of JSON_AGG and JSON_COMPOSE and is used to publish Vantage data values into a JSON document. It has the following advantages over JSON_AGG and JSON_COMPOSE:
  • It has the ability to aggregate data over 64K into a JSON document.
  • It provides consistent behavior in terms of output structure.

    By default the JSON document is composed of a top-level JSON array which contains one or more elements representing each group of data published, even if only one output group of data is included. This can be modified if desired, but the default behavior is consistent.

  • It provides the ability to publish data into any supported JSON format, even the binary storage formats.

    This is very useful if loading data into a table which uses one of these storage formats, or exporting the data to an external system which recognizes these formats.