JSON External Files | CREATE FOREIGN TABLE SQL Statement | VantageCloud Lake - JSON External Files - Teradata VantageCloud Lake

Lake - Manage and Move Data

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-05-16
dita:mapPath
atx1683670417382.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
atx1683670417382
Each record in the JSON external data can span multiple lines—that is, Vantage can read data with embedded line breaks. However, each line break must precede or follow one of these characters:
  • Left brace ({)
  • Comma (,)
  • Double quotation mark (")
  • Right brace (})
  • Colon (:)

Line breaks cannot be within the quotation marks that surround the Name or Value of the Name/Value Pair.

External JSON files can contain individual records or a single JSON array that uses a comma (,) as the record delimiter. For single-array JSON files, the record can span across multiple lines. Optionally, the JSON array can be named.

Vantage can read the following JSON documents in external object storage:

 {"field1": true,"field2": "somestring","field3": {"field4": 1}}
{
    "field1" : true,
    "field2":
         "somestring",
    "field3":
    {
        "field4":1
    }
}
[{
                "field1": "string1", "field2": "string2"
}, {
                "field1": "string3", "field2": "string4"
}]

The field names are case-sensitive.

Spaces inside quotes for the field names are significant. So, if the record contained "field1 ", then a reference to payload.field1 does not match.

Here is an example of a named JSON array:

{ "Fruits":     [        \{ "fruit": "Apple", "size": "Large", "color": "Red" }
,   

       { "fruit": "Banana", "size": "Medium", "color": "Yellow" },

       { "fruit": "Orange", "size": "Medium", "color": "Orange" },

       { "fruit": "Guava", "size": "Small", "color": "Green" },

       { "fruit": "Grapes", "size": "VerySmall", "color": "Black" }  

   ]

}

External JSON files can be compressed in GZIP format. Other forms of file compression are not supported.