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)