Sample External JSON Data with a Foreign Table | NOS | Teradata Vantage - 17.10 - Sampling External Data In Place Using a Foreign Table - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Native Object Store Getting Started Guide

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

Preview random rows of JSON data in place from external object store using a foreign table.

The examples use a sample river flow data set. To use your own data, replace the table and column names, and authorization object. See Variable Substitutions for Examples for the credentials and location values for the sample data set.

  1. To run NOS-related commands, log on to the database as a user with the required privileges.
  2. If it does not exist, create the foreign table or ask your database administrator to create the foreign table called riverflow_json. See Setting Up to Run JSON Examples.
  3. Run the following command against the foreign table:
    SELECT TOP 2 payload.* FROM riverflow_json;

    Your result will be similar to this, reflecting your external object store location:

    ["09400815","2018-07-12 00:00","0.00","-0.01","0.00",""]
    ["09396100","2018-07-16 00:00","44.7","1.50","0.00","1.50"]