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

# Install the DEE

> How to install the Data Extraction Engine (DEE) in an Atoti Server project, covering the Maven POM dependencies for CSV and in-memory extraction, the required Spring `@Value` properties configuration, and the all-in-one versus individual Spring configuration classes.

## Import the DEE library

The DEE dependency must be included in the project's POM.

<Tabs>
  <Tab title="Local CSV Extract">
    ```xml theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
    <!-- CSV data extraction support -->
    <dependency>
        <groupId>com.activeviam.io</groupId>
        <artifactId>data-extraction-engine</artifactId>
        <version>${atoti.server.version}</version>
    </dependency>
    ```
  </Tab>

  <Tab title="InMemory Extract">
    ```xml theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
    <!-- In-Memory data extraction support -->
    <dependency>
        <groupId>com.activeviam.io</groupId>
        <artifactId>data-connectors-core</artifactId>
        <version>${atoti.server.version}</version>
    </dependency>
    ```
  </Tab>
</Tabs>

## Set the required properties

The external [properties](./properties) are retrieved using the Spring `@Value` mechanism. For it to work, the following code must be included in the main Spring Config class.

```java theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
	final PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
	propertySourcesPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders(true);
	return propertySourcesPlaceholderConfigurer;
}
```

Here is a list of the [required properties](./properties#required-properties).

## Importing configurations

The DEE library provides the necessary Spring Config files to enable the DEE, so no additional configuration is required.

### All-in-one configuration

All config files can be added by adding the target-specific configuration to the application's Spring Config. These config files contain all config files needed for DEE.

| Output         | Configuration Class                        |
| -------------- | ------------------------------------------ |
| Local CSV File | `CsvDataExtractionEngineConfig.class`      |
| In Memory      | `InMemoryDataExtractionEngineConfig.class` |

Example of what an application config should look like:

```java theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
@Configuration
@Import({
		// Import the Output-Specific Data Extraction Engine
		CsvDataExtractionEngineConfig.class
})
public class ApplicationConfig {
    //...
}
```

### Individual configuration files

Optionally, users can import specific configs. The following are the configs for the CSV target:

| CSV Specific Implementation           | Description                                                                                                                                         |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CsvDataExtractionServicesConfig`     | Registers the services for the Data Extraction Engine (`ILocalDataExtractionService`) and Enhanced Drillthrough `ILocalEnhancedDrillthroughService` |
| `CsvDataExtractionRestServicesConfig` | Exposes the services so they can be accessed using REST (work in progress).                                                                         |
