WriteNOS | Data Transfer between Vantage and Cloud Storage| teradataml - WriteNOS - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
WriteNOS allows users to do the following:
  • Extract selected or all columns from an user table or from derived results and write to an external object storage in Parquet data format;
  • Write to Teradata supported external object storage, such as Amazon S3, Google Cloud Storage, or Azure Blob storage.

Example setup

from teradataml import DataFrame, load_example_data 
# Load the example data. 
load_example_data("teradataml", "titanic") 
# Create teradataml DataFrame objects. 
titanic_data = DataFrame.from_table("titanic")

Example 1: Write a DataFrame to Amazon S3 bucket

obj =  WriteNOS(data=titanic_data,
                location='/S3/s3.amazonaws.com/Your-Bucket/location/',
                authorization='{"Access_ID": "YOUR-ID", "Access_Key": "YOUR-KEY"}',
                stored_as='PARQUET')

Example 2: Write a DataFrame to Amazon S3 bucket as CSV with authorization using Access_Key and Access_ID

obj =  WriteNOS(data=titanic_data,
                location='/S3/s3.amazonaws.com/Your-Bucket/location/',
                authorization='authorization_object',
                stored_as='CSV')