Metadata Manager Tools¶
Properties of a tool (if any) can be specified in the Properties window in MIKE Workbench.
Change-log query¶
Tool for querying the entity change log for changed made in a period and/or by specified users.
Tool Info | |
---|---|
Display Name | Change-log query |
API Name | Change-log query |
Tools Explorer | /Data tools/Change-log query |
NuGet Package | DHI.MikeOperations.MetadataManager.Tools.ChangeLogQuery |
Assembly name (.dll) | DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool.dll |
API Reference | DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool.IChangeLogQueryTool |
Input Items | No input items required |
Output Items | A table of change log entries |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Query parameters | ||
Action type | ActionTypes | Gets or sets the action types (Add, Update and/or Delete) to query for, separated by a comma ','. |
End date | EndDate | Gets or sets the the end date for change log entries to query for |
Entity type | EntityType | Gets or sets the entity type (Time Series, Feature Class, Raster, Job, Spreadsheet, etc.) to query change log entries for. More entity types can be specified separeted by a comma). |
Max log-entries returned | MaxLogEntries | Gets or sets the maximum log entries returned when quering an entity (default = 1000). |
Start date | StartDate | Gets or sets the the start date for change log entries to query for. |
User name | UserName | Gets or sets the UserName who made the changes to query for. |
Code Sample
import clr
clr.AddReference("DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool")
from DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool import *
# Get the tool.
tool = app.Tools.CreateNew("Change-log query")
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
import clr
clr.AddReference("DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool")
from DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool import *
# Get the tool.
tool = DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool.IChangeLogQueryTool(app.Tools.CreateNew("Change-log query"))
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
// Get the tool
var tool = application.Tools.CreateNew("Change-log query") as DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool.ChangeLogQueryTool;
// Set the tool properties and execute.
tool.ActionTypes = "Add";
tool.EntityType = "Time Series";
tool.MaxLogEntries = 100;
tool.Execute();
// Get the output of the tool.
var tableContainer = tool.OutputItems[0] as DHI.Solutions.Generic.Tools.TableContainer;
var changeLogRows = tableContainer.TabularData.DataTableValues.Rows;
Runtime.config
What tools to load during application startup, is specified in the XML file Runtime.config
in the plugins section of the manager.
The XML below shows the tool plugin information found in the Runtime.config
file.
<Plugin
Name="DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool.ChangeLogQueryTool"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.MetadataManager.Tools.ChangeLogQueryTool.dll" />
Metadata Schema Import¶
Tool for importing a metadata schema for an entity type.
Tool Info | |
---|---|
Display Name | Metadata Schema Import |
API Name | Schema Import Tool |
Tools Explorer | /Data tools/Metadata Schema Import |
NuGet Package | DHI.MikeOperations.MetadataManager.Tools.SchemaImport |
Assembly name (.dll) | DHI.Solutions.MetadataManager.Tools.SchemaImportTool.dll |
API Reference | DHI.Solutions.MetadataManager.Tools.SchemaImportTool.ISchemaImportTool |
Input Items | No input items required |
Output Items | No output items |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Parameters | ||
Entity Type Name | EntityTypeName | Gets or sets the entity type name to import the schema to. |
File Path | FilePath | Gets or sets the path to the schema file to import. |
Code Sample
import clr
clr.AddReference("DHI.Solutions.MetadataManager.Tools.SchemaImportTool")
from DHI.Solutions.MetadataManager.Tools.SchemaImportTool import *
# Get the tool.
tool = app.Tools.CreateNew("Schema Import Tool")
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
import clr
clr.AddReference("DHI.Solutions.MetadataManager.Tools.SchemaImportTool")
from DHI.Solutions.MetadataManager.Tools.SchemaImportTool import *
# Get the tool.
tool = DHI.Solutions.MetadataManager.Tools.SchemaImportTool.ISchemaImportTool(app.Tools.CreateNew("Schema Import Tool"))
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
// Get the tool.
var tool = application.Tools.CreateNew("Schema Import Tool") as DHI.Solutions.MetadataManager.Tools.SchemaImportTool.ISchemaImportTool;
// Add input items.
tool.InputItems.Add(<No input items required>);
// Set tool properties before executing the tool.
tool.Execute();
// Read the output from the list of output items.
output = tool.OutputItems;
Runtime.config
What tools to load during application startup, is specified in the XML file Runtime.config
in the plugins section of the manager.
The XML below shows the tool plugin information found in the Runtime.config
file.
<Plugin
Name="DHI.Solutions.MetadataManager.Tools.SchemaImportTool.SchemaImportTool"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.MetadataManager.Tools.SchemaImportTool.dll" />
To change log table¶
The tool to display ChangeLogtable
Tool Info | |
---|---|
Display Name | To change log table |
API Name | To change log table |
Tools Explorer | /Output Tools/To change log table |
NuGet Package | DHI.MikeOperations.MetadataManager.Tools.ToChangeLogTable |
Assembly name (.dll) | DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable.dll |
API Reference | DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable.ToChangeLogTable |
Input Items | One or more change log data tables |
Output Items | A change log table |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Tool settings | ||
Output table name. | TableOutputName | This is the name of the table that will be created by the tool. Note that the property is only available when: TableDisplayOptions=SpecifiedTableAllowMerge=True |
Table option | TableDisplayOptions | This setting determines whether the input values shall be added to an existing or new table. Note that the property is only available when: AllowMerge=True |
Code Sample
import clr
clr.AddReference("DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable")
from DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable import *
clr.AddReference("DHI.Solutions.Generic.UI.Tools.ToTable")
from DHI.Solutions.Generic.UI.Tools.ToTable import *
# Get the tool.
tool = app.Tools.CreateNew("To change log table")
# Add input items.
tool.InputItems.Add(<One or more change log data tables>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
// Get the tool.
var tool = application.Tools.CreateNew("To change log table") as DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable.ToChangeLogTable;
// Add input items.
tool.InputItems.Add(<One or more change log data tables>);
// Set tool properties before executing the tool.
tool.Execute();
// Read the output from the list of output items.
output = tool.OutputItems;
Runtime.config
What tools to load during application startup, is specified in the XML file Runtime.config
in the plugins section of the manager.
The XML below shows the tool plugin information found in the Runtime.config
file.
<Plugin
Name="DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable.ToChangeLogTable"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable.dll" />