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 | Change-log query |
|---|---|
| Tools Explorer | /Data tools/Change-log query |
| NuGet Package | DHI.MikeOperations.MetadataManager.Tools.ChangeLogQuery |
| 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 | Name | Description |
|---|---|---|
| User name | UserName | Gets or sets the UserName who made the changes to query for. |
| Start date | StartDate | Gets or sets the the start date for change log entries to query for. |
| 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). |
| Action type | ActionTypes | Gets or sets the action types (Add, Update and/or Delete) to query for, separated by a comma ','. |
| Max log-entries returned | MaxLogEntries | Gets or sets the maximum log entries returned when quering an entity (default = 1000). |
Code Sample
// 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;
Schema Import Tool¶
Tool for importing a metadata schema for an entity type.
| Tool Info | Schema Import Tool |
|---|---|
| Tools Explorer | /Data tools/Schema Import Tool |
| NuGet Package | DHI.MikeOperations.MetadataManager.Tools.SchemaImport |
| API Reference | DHI.Solutions.MetadataManager.Tools.SchemaImportTool.ISchemaImportTool |
| Input Items | No input items required |
| Output Items | No output items |
Tool Properties
| Display Name | Name | Description |
|---|---|---|
| File Path | FilePath | Gets or sets the path to the schema file to import. |
| Entity Type Name | EntityTypeName | Gets or sets the entity type name to import the schema to. |
Code Sample
// Get the tool.
var tool = application.Tools.CreateNew("Schema Import Tool") as DHI.Solutions.MetadataManager.Tools.SchemaImportTool.ISchemaImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Schema Import Tool")
# Get the tool.
tool = DHI.Solutions.MetadataManager.Tools.SchemaImportTool.ISchemaImportTool(app.Tools.CreateNew("Schema Import Tool"))
To change log table¶
The tool to display ChangeLogtable
| Tool Info | To change log table |
|---|---|
| Tools Explorer | /Output Tools/To change log table |
| NuGet Package | DHI.MikeOperations.MetadataManager.Tools.ToChangeLogTable |
| API Reference | DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable.ToChangeLogTable |
| Input Items | No input items required |
| Output Items | No output items |
Tool Properties
| Display Name | Name | Description |
|---|---|---|
| Table option | TableDisplayOptions | |
| Output table name. | TableOutputName |
Code Sample
// Get the tool.
var tool = application.Tools.CreateNew("To change log table") as DHI.Solutions.MetadataManager.UI.Tools.ToChangeLogTable.ToChangeLogTable;
# Get the tool.
tool = app.Tools.CreateNew("To change log table")