blazingsql.BlazingContext.s3¶
-
BlazingContext.
s3
(prefix, **kwargs)¶ Register an AWS S3 bucket.
- namestring that represents the name with which you will refer to
your S3 bucket.
bucket_name : string name of your S3 bucket. access_key_id : string of your AWS IAM access key. not required for
public buckets.
- secret_keystring of your AWS IAM secret key. not required for
public buckets.
encryption_type (optional) : None (default), ‘AES_256’, or ‘AWS_KMS’. session_token (optional) : string of your AWS IAM session token. root (optional) : string path of your bucket that will be used as a
shortcut path.
- kms_key_amazon_resource (optional)string value, required for KMS
encryption only.
Register and create table from a public S3 bucket:
>>> bc.s3('blazingsql-colab', bucket_name='blazingsql-colab') >>> bc.create_table('taxi', >>> 's3://blazingsql-colab/yellow_taxi/1_0_0.parquet') <pyblazing.apiv2.context.BlazingTable at 0x7f6d4e640c90>
Register and create table from a private S3 bucket: >>> bc.s3(‘other-data’, bucket_name=’kws-parquet-data’, >>> access_key_id=’AKIASPFMPQMQD2OG54IQ’, >>> secret_key=’bmt+TLTosdkIelsdw9VQjMe0nBnvAA5nPt0kaSx/Y’, >>> encryption_type=S3EncryptionType.AWS_KMS, >>> kms_key_amazon_resource_name= >>> ‘arn:aws:kms:region:acct-id:key/key-id’) >>> bc.create_table(‘taxi’,
‘s3://other-data/yellow_taxi/1_0_0.parquet’)
<pyblazing.apiv2.context.BlazingTable at 0x7f12327c0310>