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

# Update environment variables

> Update environment variables for all existing FlowX.AI services

## FlowX Engine

### Partitioning and archiving configuration restructure

<Note>
  FlowX.AI v5.3.0 reorganizes the partitioning and archiving configuration structure. The `scheduler.dataPartitioning` section has been removed, and archiving settings are now under `partitioning.archiving`.
</Note>

#### Variables to remove

If you are using environment variables to override FlowX Engine configuration, remove these variables:

| Remove This Variable                        | Reason                                                         |
| ------------------------------------------- | -------------------------------------------------------------- |
| `SCHEDULER_DATAPARTITIONING_ENABLED`        | Replaced by `FLOWX_DATA_PARTITIONING_ARCHIVING_ENABLED`        |
| `SCHEDULER_DATAPARTITIONING_CRONEXPRESSION` | Replaced by `FLOWX_DATA_PARTITIONING_ARCHIVING_CRONEXPRESSION` |

#### Variables to replace

| Old Variable Name                                        | New Variable Name                                                  | Default Value | Description                                                                         |
| -------------------------------------------------------- | ------------------------------------------------------------------ | ------------- | ----------------------------------------------------------------------------------- |
| `FLOWX_DATA_PARTITIONING_RETENTION_INTERVALS`            | `FLOWX_DATA_PARTITIONING_ARCHIVING_RETENTIONINTERVALS`             | `3`           | Number of partition intervals to retain before archiving                            |
| `FLOWX_DATA_PARTITIONING_DETACHED_PARTITION_COMPRESSION` | `FLOWX_DATA_PARTITIONING_ARCHIVING_DETACHED_PARTITION_COMPRESSION` | `OFF`         | Compression level for archived partitions (Oracle only): `OFF`, `BASIC`, `ADVANCED` |
| `FLOWX_DATA_PARTITIONING_MOVED_DATA_BATCH_SIZE`          | `FLOWX_DATA_PARTITIONING_ARCHIVING_MOVED_DATA_BATCH_SIZE`          | `5000`        | Batch size for moving data during archiving (PostgreSQL only)                       |

#### New variables structure

The archiving configuration is now nested under `partitioning.archiving`:

| Variable                                                           | Default Value | Description                                                              |
| ------------------------------------------------------------------ | ------------- | ------------------------------------------------------------------------ |
| `FLOWX_DATA_PARTITIONING_ENABLED`                                  | `false`       | Turn on or off data partitioning                                         |
| `FLOWX_DATA_PARTITIONING_INTERVAL`                                 | `MONTH`       | Partition interval: `DAY`, `WEEK`, `MONTH`                               |
| `FLOWX_DATA_PARTITIONING_ARCHIVING_ENABLED`                        | `false`       | Turn on or off automatic archiving of old partitions                     |
| `FLOWX_DATA_PARTITIONING_ARCHIVING_RETENTIONINTERVALS`             | `3`           | Number of intervals to retain before archiving                           |
| `FLOWX_DATA_PARTITIONING_ARCHIVING_CRONEXPRESSION`                 | `0 0 1 * * ?` | Schedule expression for archiving operations (default: daily at 1:00 AM) |
| `FLOWX_DATA_PARTITIONING_ARCHIVING_DETACHED_PARTITION_COMPRESSION` | `OFF`         | Compression for archived partitions (Oracle only)                        |
| `FLOWX_DATA_PARTITIONING_ARCHIVING_MOVED_DATA_BATCH_SIZE`          | `5000`        | Batch size for data movement (PostgreSQL only)                           |

<Info>
  **Configuration structure changes:**

  * **Removed**: `scheduler.dataPartitioning` section
  * **Added**: `partitioning.archiving` subsection with all archiving-related settings
  * **Unchanged**: Core partitioning settings (`enabled`, `interval`) remain at `partitioning` level
  * **Moved**: Archiving-specific settings (`retention-intervals`, `cronExpression`, `detached-partition-compression`, `moved-data-batch-size`) are now under `partitioning.archiving`
</Info>

<Warning>
  **Action required if using partitioning:**

  If you have enabled data partitioning in FlowX Engine, you **must** update your configuration:

  1. **YAML configuration**: Update your `application.yml` to follow the new structure (see [Deployment Guidelines](./deployment-guidelines-v5.3#breaking-changes))
  2. **Environment variables**: Update variable names as shown in the tables above
  3. **Deployment order**: Update configuration before or immediately after upgrading to v5.3.0
</Warning>

#### Configuration examples

<Tabs>
  <Tab title="Environment Variables (Before)">
    ```bash theme={"system"}
    # Old structure (v5.2 and earlier)
    SCHEDULER_DATAPARTITIONING_ENABLED=true
    SCHEDULER_DATAPARTITIONING_CRONEXPRESSION=0 0 1 * * ?
    FLOWX_DATA_PARTITIONING_ENABLED=true
    FLOWX_DATA_PARTITIONING_INTERVAL=MONTH
    FLOWX_DATA_PARTITIONING_RETENTION_INTERVALS=3
    FLOWX_DATA_PARTITIONING_DETACHED_PARTITION_COMPRESSION=OFF
    FLOWX_DATA_PARTITIONING_MOVED_DATA_BATCH_SIZE=5000
    ```
  </Tab>

  <Tab title="Environment Variables (After)">
    ```bash theme={"system"}
    # New structure (v5.3.0)
    FLOWX_DATA_PARTITIONING_ENABLED=true
    FLOWX_DATA_PARTITIONING_INTERVAL=MONTH
    FLOWX_DATA_PARTITIONING_ARCHIVING_ENABLED=true
    FLOWX_DATA_PARTITIONING_ARCHIVING_RETENTIONINTERVALS=3
    FLOWX_DATA_PARTITIONING_ARCHIVING_CRONEXPRESSION=0 0 1 * * ?
    FLOWX_DATA_PARTITIONING_ARCHIVING_DETACHED_PARTITION_COMPRESSION=OFF
    FLOWX_DATA_PARTITIONING_ARCHIVING_MOVED_DATA_BATCH_SIZE=5000
    ```
  </Tab>
</Tabs>

<Info>
  **Impact assessment:**

  This change only affects deployments that have:

  * Enabled data partitioning (`FLOWX_DATA_PARTITIONING_ENABLED=true`)
  * Configured archiving settings

  If partitioning is disabled, you should still update your configuration files for future compatibility, but there is no immediate operational impact.
</Info>

### New optional variables

| Variable                        | Default Value                                  | Description                                                                                                                           |
| ------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `KAFKA_TOPIC_CONNECTOR_PATTERN` | Falls back to `KAFKA_TOPIC_PATTERN` if not set | Dedicated topic pattern for FlowX connectors, separate from other platform components like document-plugin, data-search, and cms-core |

<Info>
  The `KAFKA_TOPIC_CONNECTOR_PATTERN` variable allows you to configure a custom Kafka topic pattern specifically for FlowX connectors without affecting other platform components.
</Info>

<Card title="Complete migration guide" href="migration-overview" icon="book">
  See the Deployment Guidelines for complete configuration examples, step-by-step migration instructions, and troubleshooting guidance.
</Card>
