Extend the schema
- Last UpdatedApr 24, 2025
- 1 minute read
Your plugin may require correction factors beyond TemperatureCorrectionFactor and PressureCorrectionFactor. One solution is to add these factors as fields to their respective table by adding additional schema extensions and use CalculateCustomFactors to calculate other factors. It is important to pay attention to the “Source" in the Argument class.
A source of VFC – the field must be on the accumulator table.
A source of Tank – the field must be on the tank table.
A source of linepack – the field must be on the pipe_segment table.
You can create a schema extension .json file that includes the extra fields you want to include. Refer to the following accumulator_override.json example.
Example: Extending Accumulator
{
"name": "accumulator",
"fields": [
{
"name": "hydroCAccumulator",
"type": "double",
"description": "Testing Custom Value",
"replicationMode": "All",
"classification": "Configuration"
}
]
}
Place the file in %DNADataRoot%\RealTime\database\schema\tables\your_accumulator _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