|
1 | 1 | # S3 collector-config.yaml example |
2 | | -# Note: The following example is for AWS S3. For S3 compatible storage, see the example below. |
3 | 2 | # All AWS S3 parameters are optional according to default behavior of boto3. |
| 3 | +# If not provided, boto3 will search for credentials in environment variables, ~/.aws/credentials and ~/.aws/config |
| 4 | + |
4 | 5 | platform_host_url: http://localhost:8080 |
5 | | -default_pulling_interval: 10 # Can be omitted to run collector once |
| 6 | +default_pulling_interval: 60 # Pulling interval in minutes. Can be omitted to run collector once |
6 | 7 | token: "" # Token that must be retrieved from the platform |
7 | 8 | plugins: |
8 | 9 | - type: s3 |
9 | 10 | name: s3_adapter |
10 | 11 | aws_secret_access_key: <aws_secret_access_key> # Optional. |
11 | 12 | aws_access_key_id: <aws_access_key_id> # Optional. |
12 | | - aws_session_token: <aws_session_token> # Optional. |
| 13 | + aws_session_token: <aws_session_token> # Optional. Required if using temporary credentials. |
13 | 14 | aws_region: <aws_region> # Optional. |
| 15 | + aws_role_arn: <aws_role_arn> # Optional. Required for assuming role with temporary credentials. |
| 16 | + aws_role_session_name: <aws_role_session_name> # Optional. Required for assuming role with temporary credentials. |
| 17 | + profile_name: <profile_name> # Optional. |
14 | 18 | filename_filter: # Optional. Default filter allows each file to be ingested to platform. |
15 | 19 | include: [ '.*.parquet' ] |
16 | 20 | exclude: [ 'dev_.*' ] |
17 | | - datasets: |
18 | | - # Recursive fetch for all objects in the bucket. |
19 | | - - bucket: my_bucket |
20 | | - # Explicitly specify the prefix to file. |
21 | | - - bucket: my_bucket |
22 | | - prefix: folder/subfolder/file.csv |
23 | | - # When we want to use the folder as a dataset. Very useful for partitioned datasets. |
24 | | - # I.e it can be Hive partitioned dataset with structure like this: |
25 | | - # s3://my_bucket/partitioned_data/year=2019/month=01/... |
26 | | - - bucket: my_bucket |
27 | | - prefix: partitioned_data/ |
28 | | - folder_as_dataset: |
29 | | - file_format: parquet |
30 | | - flavor: hive |
31 | | - |
32 | | - #field_names must be provided if partition flavor was not used. I.e for structure like this: |
33 | | - # s3://my_bucket/partitioned_data/year/... |
34 | | - - bucket: my_bucket |
35 | | - prefix: partitioned_data/ |
36 | | - folder_as_dataset: |
37 | | - file_format: csv |
38 | | - field_names: ['year'] |
39 | | - |
40 | | -# S3 compatible collector-config.yaml example, for example for Minio we need to specify endpoint_url |
41 | | -platform_host_url: "http://localhost:8080" |
42 | | -default_pulling_interval: 10 |
43 | | -token: "" |
44 | | -plugins: |
| 21 | + dataset_config: |
| 22 | + bucket: my_bucket |
| 23 | + prefix: folder/subfolder/file.csv # Optional. Default is empty string. |
| 24 | + # When we want to use the folder as a dataset. Very useful for partitioned datasets. |
| 25 | + - type: s3 |
| 26 | + name: s3_partitioned_adapter |
| 27 | + aws_secret_access_key: <aws_secret_access_key> # Optional. |
| 28 | + aws_access_key_id: <aws_access_key_id> # Optional. |
| 29 | + aws_session_token: <aws_session_token> # Optional. Required if using temporary credentials. |
| 30 | + aws_region: <aws_region> # Optional. |
| 31 | + aws_role_arn: <aws_role_arn> # Optional. Required for assuming role with temporary credentials. |
| 32 | + aws_role_session_name: <aws_role_session_name> # Optional. Required for assuming role with temporary credentials. |
| 33 | + profile_name: <profile_name> # Optional. |
| 34 | + dataset_config: |
| 35 | + bucket: my_bucket |
| 36 | + prefix: partitioned_data/ |
| 37 | + folder_as_dataset: |
| 38 | + file_format: parquet # Format of the files in the folder. Can be parquet csv, tsv. |
| 39 | + flavor: hive # Optional. Default is hive. Can be hive or presto. |
| 40 | + field_names: ['year', 'month'] # Optional. Must be provided if flavor is other than hive. I.e. structure s3://my_bucket/partitioned_data/year/... |
| 41 | + # When S3 storage is compatible with AWS S3 API, for example Minio. |
45 | 42 | - type: s3 |
46 | 43 | name: s3_minio_adapter |
47 | 44 | endpoint_url: http://localhost:9000 |
48 | 45 | aws_secret_access_key: minioadmin |
49 | 46 | aws_access_key_id: minioadmin |
50 | | - datasets: |
51 | | - - bucket: my_bucket |
52 | | - prefix: partitioned_data |
| 47 | + dataset_config: |
| 48 | + bucket: my_bucket |
53 | 49 |
|
0 commit comments