Module chewdata::connector::bucket_select

source ·
Expand description

Filter data file with S3 select queries and read data into AWS/Minio bucket. Use Bucket connector in order to write into the bucket.

§Configuration

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use this connectorbucketbucket
metadatametaOverride metadata informationnullcrate::Metadata
endpoint-Endpoint of the connectornullString
access_key_id-The access key used for the authentificationnullString
secret_access_key-The secret access key used for the authentificationnullString
region-The bucket’s regionus-east-1String
bucket-The bucket namenullString
pathkeyThe path of the resource. Can use * in order to read multiple files with the same content typenullString
parametersparamsThe parameters used to remplace variables in the pathnullObject or Array of objects
query-S3 select queryselect * from s3objectSee AWS S3 select
limit-Limit the number of files to read with the wildcard mode in the pathnullUnsigned number
skip-Skip N files before to start to read the next files with the wildcard mode in the pathnullUnsigned number

§Examples

[
    {
        "type": "r",
        "connector": {
            "type": "bucket_select",
            "bucket": "my-bucket",
            "path": "data/my_file.jsonl",
            "endpoint": "{{ BUCKET_ENDPOINT }}",
            "access_key_id": "{{ BUCKET_ACCESS_KEY_ID }}",
            "secret_access_key": "{{ BUCKET_SECRET_ACCESS_KEY }}",
            "region": "{{ BUCKET_REGION }}",
            "query": "select * from s3object[*].results[*] r where r.number = 20"
        },
        "document" : {
            "type": "jsonl"
        }
    }
]

Structs§