> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud fetching config

> Configuration reference for `CloudFetchingConfig`, which tunes downloader thread count, part length, and prefetched parts limit for cloud sources such as the AWS CSV Source.

### Configuration properties

Properties for the Cloud Fetching Config are provided inside the configuration of a cloud source.
For example: [AWS CSV Source](/configuration/csv/aws-csv-source).

| Key                    | Type    | Default                                                      | Description                                                                                                   |
| ---------------------- | :------ | :----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| download-thread-count  | Integer | 1.5 times the number of the server's logical cores, rounded. | The maximum number of downloader threads for one single file.                                                 |
| part-length            | Integer | 8 \* 1024 \* 1024                                            | The amount of chunks that can be downloaded in advance. This is used to compensate network speed instability. |
| prefetched-parts-limit | Integer | `max(1000 - threadCount, 0)`                                 | The size in bytes of an individual downloaded part.                                                           |

#### YAML example

```yaml theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
dlc:
  csv:
    aws:
      sources:
        awsCsvSource:
          bucket: bucket
          prefix: dataDir
          cloud-fetching-config:
            prefetched-parts-limit: 10
            part-length: 20
            download-thread-count: 30
```

### Java configuration

The `CloudFetchingConfig` Java object can be used in the configuration of a
cloud source.

For more information, see the Atoti Server documentation on
[CloudFetchingConfig](https://docs.activeviam.com/products/atoti/server/latest/docs/sources/cloud/cloud_source#usage-with-data-sources).

#### Java example

```java theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
@Bean
AwsCsvSourceDescription source() {
    return AwsCsvSourceDescription.builder("awsCsvSource", "bucket", "dataDir")
            .cloudFetchingConfig(CloudFetchingConfig.builder()
                    .prefetchedPartsLimit(10)
                    .partLength(20)
                    .downloadThreadCount(30)
                    .build())
            .build();
}
```
