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

Teradata Vantageā„¢ - Native Object Store Getting Started Guide

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

Preview random rows of CSV 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_csv. See Setting Up to Run CSV Examples.
  3. To see sample records with the attribute names included before each string of values, issue the following command against the foreign table called riverflow_csv:
    SELECT TOP 2 payload
    FROM riverflow_csv;

    Your results will be similar to the following. Because payload was specified instead of payload..*, each row displays the concatenated header.

    Payload
    -----------------------------------------------------------------------------------
    BatteryVoltage,Flow,site_no,datetime,Precipitation,GageHeight ,0.00,09400815,2018-07-12 00:15,0.00,-0.01
    BatteryVoltage,Flow,site_no,datetime,Precipitation,GageHeight ,0.00,09400815,2018-07-12 00:45,0.00,-0.01