Extend the schema
- Last UpdatedApr 24, 2025
- 1 minute read
Your plugin may require additional parameters to be used in the level-to-volume calculations, such as the physical dimensions of a tank. One solution is to add these parameters as fields on the Tank table by extending the RealTime database schema.
You can create a schema extension .json file that includes the extra fields you want to include. Refer to the following tank_override.json example.
{
"name": "tank",
"fields": [
{
"name": "ATNumerator",
"type": "int",
"description": "Custom acceptance testing level and volume plugin numerator",
"replicationMode": "All",
"classification": "Configuration"
},
{
"name": "ATDenominator",
"type": "int",
"description": "Custom acceptance testing level and volume plugin denominator",
"replicationMode": "All",
"classification": "Configuration"
},
{
"name": "ATMaxIncrements",
"type": "int",
"description": "Custom acceptance testing level and volume plugin maximum increments",
"replicationMode": "All",
"classification": "Configuration"
},
{
"name": "ATMaxVolume",
"type": "double",
"description": "Custom acceptance testing level and volume plugin maximum volume",
"replicationMode": "All",
"classification": "Configuration"
},
]
}
Place the file in %DNADataRoot%\RealTime\database\schema\tables\your_tank_override_file_name.json.
Note: The name of the file does not matter if it does not conflict with an existing file in the same directory.
When naming your extended fields, make sure they do not conflict with any fields in the baseline schema. Consider adding a special prefix or suffix to your field names to ensure they do not conflict with baseline fields that may be added in the future.
Applying the schema extensions
After you have included your schema extensions, you can apply them by doing the following:
-
If necessary, shut down the RealTime service.
-
Open a Windows Command Prompt.
-
Execute the following command:
%DNAInstallRoot%\RealTime\bin\SchemaConverter.exe