GetRubMdResult GetRubMd(RubId tRub, GetRubMdArg tArg)
tRub. Opened time series database instance moniker.
tArg. Parameters of getting metadata.
The GetRubMd operation gets metadata of time series database.
To execute the operation, in the tRub parameter specify the opened time series database instance moniker, and in the tArg parameter specify getting parameters. The moniker can be obtained on executing the OpenRub operation. The operation results in the requested metadata.
Below is the example of getting time series database properties and the period, in which series values can be stored. The request contains time series database moniker. The response contains the obtained data.
{
"GetRubMd" :
{
"tRub" :
{
"id" : "S1!M!S!R1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"period" : "true",
"properties" : "true"
}
}
}
}
{
"GetRubMdResult" :
{
"id" :
{
"id" : "S1!M!S!R1"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "5",
"@hf" : "0",
"i" : "TS_DB",
"n" : "Time series database",
"k" : "5472",
"c" : "2822",
"p" : "5471",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
},
"openArgs" : ""
},
"period" :
{
"startYear" : "1980",
"endYear" : "2020"
},
"properties" :
{
"@lightWeight" : "0",
"@useDeduplication" : "0",
"@valuesOnQuery" : "0",
"@factsOnQuery" : "0",
"@hasMnemonics" : "1",
"@revisionsOnQuery" : "0",
"@treatEmptyStringAsNull" : "0",
"@keepHistory" : "1",
"@autoUpdateStat" : "1",
"@useDistinctSequence" : "0",
"@separateTableForActualData" : "0",
"@unitIsRequired" : "0",
"@compoundFactorKey" : "0",
"@hasEmptyAttribute" : "0",
"objRdsRepo" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "RDS",
"n" : "MDM repository",
"k" : "159",
"c" : "4353",
"p" : "51",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"objUnitsDictionary" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "UNITS_D",
"n" : "Measurement units",
"k" : "174",
"c" : "3076",
"p" : "159",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"objMeasuresDictionary" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "MEASURES",
"n" : "Measures",
"k" : "172",
"c" : "3076",
"p" : "159",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"calendarLevels" :
{
"it" :
[
"Year",
"Quarter",
"Month"
]
},
"firstDayOfWeek" : "Monday"
}
}
}
}
public static GetRubMdResult GetRubMetadata(RubId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetRubMd()
{
tArg = new GetRubMdArg()
{
//Pattern that will be used to get metadata
pattern = new RubMdPattern()
{
properties = true
}
},
tRub = moniker
};
//Getting time series database metadata
var result = somClient.GetRubMd(tGet);
return result;
}
See also: