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

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

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.05
created_date
January 2021
category
Programming Reference
featnum
B035-1214-175K
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.