Shadow DB

Root Configuration

Class name: org.apache.shardingsphere.shadow.api.config.ShadowRuleConfiguration

Attributes:

NameDataTypeDescriptionDefault Value
enablebooleanShadow DB switch. Optional values: true/falsefalse
dataSourcesMap<String, ShadowDataSourceConfiguration>Shadow data source mapping name and configurationNone
tablesMap<String, ShadowTableConfiguration>Shadow table name and configurationNone
defaultShadowAlgorithmNameStringdefault shadow algorithm nameOption item
shadowAlgorithmsMap<String, ShardingSphereAlgorithmConfiguration>Shadow algorithm name and configurationNone

Shadow Data Source Configuration

Class name: org.apache.shardingsphere.shadow.api.config.datasource.ShadowDataSourceConfiguration

Attributes:

NameDataTypeDescriptionDefault Value
sourceDataSourceNameStringProduction data source nameNone
shadowDataSourceNameStringShadow data source nameNone

Shadow Table Configuration

Class name: org.apache.shardingsphere.shadow.api.config.table.ShadowTableConfiguration

Attributes:

NameDataTypeDescriptionDefault Value
dataSourceNamesCollection<String>Shadow table location shadow data source namesNone
shadowAlgorithmNamesCollection<String>Shadow table location shadow algorithm namesNone

Shadow Algorithm Configuration

Please refer to Built-in Shadow Algorithm List.