> ## 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.

# Local CSV source

> Configuration reference for `LocalCsvSourceDescription`, which loads CSV files from a local root directory and restricts loading to files within that source.

The root directory is set through the `root-base-dir` property, which supports scope parameter placeholders.

The DLC ensures that only files within that source can be loaded.

### Configuration properties

Properties for a Local CSV Source are defined by name in the `dlc.csv.local.sources` namespace,
and are picked up as configurations for the DLC.

| Key                     | Required | Type                               | Description                                                                                                       |
| ----------------------- | :------: | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| root-base-dir           |     Y    | `String`                           | Root base directory. Can include [Scope Parameters](/functional/scope-parameters). <br />Example `#{SCOPE_PARAM}` |
| source-properties       |          | `CsvSourceConfigurationProperties` | [CSV Source Configuration](/configuration/csv/csv-source-config)                                                  |
| topics-to-include       |          | `Set<String>`                      | Topics to include. See [source to topic matching](/functional/source-to-topic-matching).                          |
| topics-to-exclude       |          | `Set<String>`                      | Topics to exclude. See [source to topic matching](/functional/source-to-topic-matching).                          |
| accepts-topic-overrides |          | `Boolean`                          | Whether this source is allowed to accept Topic Overrides in the [Load Request](/operations/operations-load).      |

#### YAML example

```yaml theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
dlc:
  csv:
    local:
      sources:
        localCsvSource:
          root-base-dir: data
        datedSource:
          root-base-dir: data/#{AS_OF_DATE}
```

### Java configuration

`LocalCsvSourceDescription` Spring Beans are picked up as configurations for the DLC.

| Parameter             | Required | Type                     | Description                                                                                                  |
| --------------------- | :------: | ------------------------ | ------------------------------------------------------------------------------------------------------------ |
| name                  |     Y    | `String`                 | Name of the source.                                                                                          |
| rootBaseDir           |     Y    | `String`                 | Root base directory.                                                                                         |
| sourceConfiguration   |          | `CsvSourceConfiguration` | [CSV Source Configuration](/configuration/csv/csv-source-config)                                             |
| topicsToInclude       |          | `Set<String>`            | Topics to include. See [source to topic matching](/functional/source-to-topic-matching).                     |
| topicsToExclude       |          | `Set<String>`            | Topics to exclude. See [source to topic matching](/functional/source-to-topic-matching).                     |
| acceptsTopicOverrides |          | `Boolean`                | Whether this source is allowed to accept Topic Overrides in the [Load Request](/operations/operations-load). |

#### Java example

```java theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
@Bean
LocalCsvSourceDescription source() {
    return LocalCsvSourceDescription.builder("localCsvSource", "data")
            .build();
}

@Bean
LocalCsvSourceDescription datedSource() {
    return LocalCsvSourceDescription.builder("datedSource", "data/#{AS_OF_DATE}")
            .build();
}
```
