-
Notifications
You must be signed in to change notification settings - Fork 6
GlobalSetting
- EXPORT, CREATE, UPDATE, and DELETE operations are supported.
| Column Header | Example value | Description |
|---|---|---|
| Group | Administration |
The setting group. |
| Key | SystemMessage |
The setting key within the group. |
| Value | Scheduled upgrade planned for Friday 5PM local time. Save your work! |
The setting value as text. Setting text can be any size, can be multiline. If the value starts with a @ and the remainder of the value resolves to an existing file, the contents of that file will be used as the setting value. See the File-based settings section below for more details. |
| Description | System wide message to be displated to all users. |
An optional description. |
The Group and Key columns are required for CREATE, UPDATE, and DELETE operations.
Some configurable settings are actually entire text files, spanning multiple lines. Often these settings are JSON or XML documents, used to configure certain AQTS components (often report or field data plugins).
These documents can be stored directly in the CSV Value column, but the will need to follow the CSV-escaping rules of:
- Surrounding the entire value in double quotes
". - Double-escaping any double-quote character
"with two consecutive double qutoes"".
This is supported, but it is confusing to read, since double-quotes are common in both JSON and XML, and double-double-quotes are just unwieldy.
Let's assume that you are configuring the SxS Pro field data plugin.
The JSON configuration for the expected time and date formats parsed by the plugin is this 4-line JSON document.
{
"DateFormats": [ "M/d/yyyy", "M-d-yyyy", "yyyy/M/d", "yyyy-M-d" ],
"TimeFormats": [ "h:m:s tt", "h:m tt", "H:m:s", "H:m" ]
}Representing that setting in a CSV row, with all the double-double-quotes, can be done like this:
Group,Key,Value,Description
FieldDataPluginConfig-SxSPro,Config,"{
""DateFormats"": [ ""M/d/yyyy"", ""M-d-yyyy"", ""yyyy/M/d"", ""yyyy-M-d"" ],
""TimeFormats"": [ ""h:m:s tt"", ""h:m tt"", ""H:m:s"", ""H:m"" ]
}",Our custom config for the plugin timestamps.That is doable, but quickly becomes unweildy.
The GlobalSetting CSV reader supports a special syntax when the Value column:
- Is a single line.
- Starts with an
@character. - The remainder of the column is a file path which resolves to an existing file on the computer running the ProvisingTool executable.
When all three conditions are met, the contents of the existing file is used as setting value.
That would allow the previous SxS Pro JSON configuration setting to be stored at C:\Users\SusanSmith\OurSpecialTimestamps.json as:
{
"DateFormats": [ "M/d/yyyy", "M-d-yyyy", "yyyy/M/d", "yyyy-M-d" ],
"TimeFormats": [ "h:m:s tt", "h:m tt", "H:m:s", "H:m" ]
}And referenced from a CSV that looks like this:
Group,Key,Value,Description
FieldDataPluginConfig-SxSPro,Config,@C:\Users\SusanSmith\OurSpecialTimestamps.json,Our custom config for the plugin timestamps.This makes importing arbitrary XML or JSON configuration settings much more robust.
When the EXPORT operation is performed, any XML or JSON documents are automatically exported as separate files in the same folder as the exported CSV file as {csvPath}.{Group}.{Key}.txt.
$ ProvisioningTool.exe -server=doug-vm2019 -y -task="EXPORT GlobalSetting all.globalsettings.csv"
Performing the following tasks:
Export GlobalSetting from 'all.globalsettings.csv'
You have specified to skip confirmation. Operations started.
ProvisioningTool (v3.0.30)
Running command: Export GlobalSetting from all.globalsettings.csv...
Connecting to doug-vm2019 ...
Connected to doug-vm2019 (v2022.1.85.0) as admin.
Started: Export GlobalSetting.
Exporting GlobalSetting to 'all.globalsettings.csv' ...
Fetching all existing GlobalSettings ...
Exporting 139 GlobalSettings to 'all.globalsettings.csv' ...
Saving global setting file value to @'all.globalsettings.EventProcessor.ProcessorVersion.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-AnnualMaximumAndMinimum.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-AntecedentRainfall.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-AutomatedSnowWeatherStationGraph.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-BenchmarkHistory.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-ContinuousDataProduction.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-CrossSectionSurvey.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-CrossSectionSurveyPlot.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-CurrentConditionsPlot.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-CurrentConditionsTable.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DailyAggregateByYear.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DailyMeanDischarge.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DailyMeanFlow.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DailyMidnightContents.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DailyMidnightReservoirElevation.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DailyStatisticByYear.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DailyStatisticOverlaidByYearChart.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DirectDischargeSite.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DischargeMeasurements.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DischargeMeasurementsR56.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DiscreteData.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-DoubleMassPlot.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-FieldActivity.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-FieldVisitReadings.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-FieldVisitReadingsInMultipleLocations.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-FlowDuration.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-GaugingMeasurements.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-GroundwaterLevelStatisticsChart.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-HourlyStatisticByWeek.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-HydrologicalCommaSeparated.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-Instrumentation.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-Inventory.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-LocationsData.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-MeasurementList.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-MonthlyAndDailyMeans.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-ProfilePlot.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-ProfileTable.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-RainfallMonthlyTotals.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-RainfallSummary.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-RatingCurve.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-RatingShiftAnalysis.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-RatingTable.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-SB88.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-ScatterPlot.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-ShiftAnalysis.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-SoilMoisture.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-TimeSeriesCharts.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-TimeSeriesPlot.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-TwelveMonthDailyMean.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-USGSDailyMean.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-USGSPrimary.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-USGSReservoir.Definition.txt' ...
Saving global setting file value to @'all.globalsettings.ReportPluginConfig-WindRose.Definition.txt' ...
Finished: Export GlobalSetting.
Completed running command: Export GlobalSetting.
Done!