Previewing the Parquet Schema | Native Object Store ( NOS ) | Teradata Vantage - Previewing the Parquet Schema Using READ_NOS - Advanced SQL Engine - Teradata Database

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

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
jjn1567647976698.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1214
lifecycle
previous
Product Category
Software
Teradata Vantage
To view the schema of your Parquet data, use the READ_NOS table operator with the RETURNTYPE('NOSREAD_PARQUET_SCHEMA') clause.

The examples and results show a sample river flow data set. To use your own data, replace the table and column names, and authorization object.

  1. To run NOS-related commands, log on to the database as a user with the required privileges.
  2. View the schema of the Parquet data:
    SELECT * FROM READ_NOS_FM (
    USING
    STOREDAS('PARQUET')
    FULLSCAN('TRUE')
    RETURNTYPE('NOSREAD_PARQUET_SCHEMA')
    LOCATION ('YOUR-STORAGE-ACCOUNT')
    ) AS D;

    See Variable Substitutions for Examples for the credentials and location values for the sample river flow data set.

    Your result will be similar to this:

    Location /S3/td-usgs.s3.amazonaws.com/PARQUETDATA/09394500/2018/06/27.parquet
            ParquetColumnName GageHeight2
    ParquetColumnPhysicalType DOUBLE
    ParquetColumnLogicalType NONE
                 TDColumnType FLOAT
       ParquetColumnPrecision           0
           ParquetColumnScale           0
       ParquetColumnMinLength           0
       ParquetColumnMaxLength           0
          ParquetColumnIsNull    1
             ParquetColumnPos    1
                     Location /S3/td-usgs.s3.amazonaws.com/PARQUETDATA/09394500/2018/06/27.parquet
            ParquetColumnName Flow
    ParquetColumnPhysicalType DOUBLE
    ParquetColumnLogicalType NONE
                 TDColumnType FLOAT
       ParquetColumnPrecision           0
           ParquetColumnScale           0
       ParquetColumnMinLength           0
       ParquetColumnMaxLength           0
          ParquetColumnIsNull    1
             ParquetColumnPos    2
    [...]
    For readability, the output is displayed vertically.