Configuration – shadow database
Shadow databases can route SQL executions according to configured shadow rules and shadow algorithms; therefore, test data is isolated from production data. This feature can solve data corruption problems in stress tests.
In this section, we will introduce you to DistSQL statements and the examples concerning shadow databases alongside related YAML configurations and examples.
DistSQL
DistSQL also provides support for the shadow database feature. This means that you can create, modify, delete, and query shadow rules using DistSQL:
Create Shadow Rule
: The create syntax is as follows:CREATE SHADOW RULE shadow_rule( SOURCE=resourceName, SHADOW=resourceName, tableName((algorithmName, TYPE(NAME=encryptAlgorithmType ,PROPERTIES('key'='value'))) ));
In addition to creating shadow rules, DistSQL also provides a syntax for creating shadow algorithms and setting default shadow algorithms.
To...