to_s3

View.to_s3(bucket: str, key: str, region: str, sep: str = ',', batch_size: int = 50000)[source]

Writes the underlying data into a newly created CSV file located in an S3 bucket.

NOTE THAT S3 IS NOT SUPPORTED ON WINDOWS.

Args:
bucket (str):

The bucket from which to read the files.

key (str):

The key in the S3 bucket in which you want to write the output. The ending “.csv” and an optional batch number will be added automatically.

region (str):

The region in which the bucket is located.

sep (str, optional):

The character used for separating fields.

batch_size(int, optional):

Maximum number of lines per file. Set to 0 to read the entire data frame into a single file.

Example:
>>> getml.engine.set_s3_access_key_id("YOUR-ACCESS-KEY-ID")
>>>
>>> getml.engine.set_s3_secret_access_key("YOUR-SECRET-ACCESS-KEY")
>>>
>>> your_view.to_s3(
        ...     bucket="your-bucket-name",
        ...     key="filename-on-s3",
        ...     region="us-east-2",
        ...     sep=';'
        ... )