ReadNOS | Data Transfer between Vantage and Cloud Storage| teradataml - ReadNOS - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage
ReadNOS allows users to do the following:
  • Perform an ad hoc query on all data formats with the data in-place on external object storage;
  • List all the objects and path structure of external object storage;
  • List the external object storage;
  • Discover the schema of the data;
  • Read CSV, JSON, and Parquet data;
  • Bypass creating a foreign table in the user.

Example 1: Read Parquet file from AWS S3 bucket

obj =  ReadNOS(location='/S3/s3.amazonaws.com/Your-Bucket/location/',
               authorization='authorization_object',
               stored_as='PARQUET')
# Print the result DataFame.
print(obj.result)

Example 2: Read CSV file with Authorization using Access_Key and Access_ID

# Create a table to store the data.
td_context.execute("CREATE TABLE read_nos_support_tab (payload dataset storage format csv) NO PRIMARY INDEX;")
read_nos_support_tab = DataFrame("read_nos_support_tab")
# Read the CSV data using "data" argument.
obj = ReadNOS(data=read_nos_support_tab,
              authorization='{"Access_ID": "YOUR-ID", "Access_Key": "YOUR-KEY"}',
              location='/S3/s3.amazonaws.com/Your-Bucket/csv-location/',
              stored_as='TEXTFILE')
# Print the result DataFame.
print(obj.result)