SetHieMdResult SetHieMd(HieId tHie, SetHieMdArg tArg)
tHie. Information required to change metadata of the factors hierarchy.
tArg. Operation execution parameters.
The SetHieMd operation changes metadata of the time series database factors' hierarchy.
To execute the operation, in the tHie parameter specify moniker of the factors hierarchy instance, and in the tArg parameter specify data change parameters. The moniker can be obtained on executing the OpenHie operation. The operation results in the updated metadata if the tArg.metaGet field was defined on operation execution.
{ "SetHieMd" : { "tHie" : { "id" : "S1!M!S!H2" }, "tArg" : {
"pattern" : { "obInst" : "true", "levs" : "true" }, "meta" : { "levs" : { "its" :
{ "it" : [ { "k" : "2", "id" : "LEVEL1", "n" : "Country", "vis" : "true", "atts" : {
"its" : { "it" : [ { "k" : "9", "id" : "COUNTRY", "n" : "Country", "vis" : "true", "dim"
{ "k" : "208", "id" : "COUNTRY", "n" : "Country", "vis" : "true" }, "includeSelectedOnly" : "false", "namingFormat" : "", "isLeaf" : "true", "levKey" : "2",
"orderBy" : { "isActive" : "false" } } ] } }, "isLeaf" : "true" },
{ "k" : "1", "id" : "LEVEL", "n" : "Period", "vis" : "true", "atts" : { "its" : { "it"
[ { "k" : "4", "id" : "DL", "n" : "Period", "vis" : "true", "dim" : { "k" : "5482", "id" : "CALENDAR_LEVELS"
"n" : "Frequencies", "vis" : "true" }, "includeSelectedOnly" : "false", "namingFormat" : "", "isLeaf" : "false", "levKey" : "1", "orderBy" : { "isActive" : "false"
} } ] } }, "isLeaf" : "false" } ] } }
}, "metaGet" : { "obInst" : "true", "atts" : "true", "levs" : "true", "props" : "true" } } } }
{ "SetHieMdResult" : { "id" : { "id" : "S1!M!S!H2"
}, "meta" : { "obInst" : { "obDesc" : { "@isShortcut" : "0", "@isLink" : "0", "i" : "TS_DB",
"n" : "Time series database", "k" : "1", "c" : "2829", "p" : "5472", "h" : "0" } }, "dirty" : "0", "atts" : {
"its" : { "it" : [ { "k" : "4", "id" : "DL", "n" : "Period", "vis" : "1", "dim" :
{ "k" : "5482", "id" : "CALENDAR_LEVELS", "n" : "Frequencies", "vis" : "1" }, "includeSelectedOnly" : "0", "namingFormat" : "", "isLeaf" : "0", "levKey" : "1"
"orderBy" : { "isActive" : "0" } }, { "k" : "9", "id" : "COUNTRY", "n" : "Country", "vis" : "1",
"dim" : { "k" : "208", "id" : "COUNTRY", "n" : "Country", "vis" : "1" }, "includeSelectedOnly" : "0", "namingFormat" : "", "isLeaf" : "1",
"levKey" : "2", "orderBy" : { "isActive" : "0" } } ] } }, "levs" :
{ "its" : { "it" : [ { "k" : "1", "id" : "LEVEL", "n" : "Period", "vis" : "1",
"atts" : { "its" : { "it" : [ { "k" : "4", "id" : "DL", "n" : "Period"
"vis" : "1", "dim" : { "k" : "5482", "id" : "CALENDAR_LEVELS", "n" : "Frequencies", "vis" : "1" }, "includeSelectedOnly" : "0", "namingFormat" : ""
"isLeaf" : "0", "levKey" : "1", "orderBy" : { "isActive" : "0" } } ] } },
"isLeaf" : "0" }, { "k" : "2", "id" : "LEVEL1", "n" : "Country", "vis" : "1", "atts" : { "its" :
{ "it" : [ { "k" : "9", "id" : "COUNTRY", "n" : "Country", "vis" : "1", "dim" : {
"k" : "208", "id" : "COUNTRY", "n" : "Country", "vis" : "1" }, "includeSelectedOnly" : "0", "namingFormat" : "", "isLeaf" : "1", "levKey" : "2", "orderBy" :
{ "isActive" : "0" } } ] } }, "isLeaf" : "1" } ]
} }, "props" : { "whereIsEmpty" : "0", "leafLoadExtent" : "0", "filterMode" : "All" } } } }
public static SetHieMdResult SetHieMetadata(HieId moniker, HieAtts attributes, HieLevs levels) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tGet = new SetHieMd() { tArg = new SetHieMdArg() { //Pattern that will be used to change metadata pattern = new HieMdPattern() { //atts = true
levs = true }, //Updated metadata meta = new HieMd() { //atts = attributes, levs = levels }, metaGet = new HieMdPattern() {
atts = true, levs = true, props = true } }, tHie = moniker }; //Open time series database var result = somClient.SetHieMd(tGet); return result; }
See also:
Working with Time Series Database