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.
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')