GetRubMd

Syntax

GetRubMdResult GetRubMd(RubId tRub, GetRubMdArg tArg)

Parameters

tRub. Opened time series database instance moniker.

tArg. Parameters of getting metadata.

Description

The GetRubMd operation gets metadata of time series database.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetRubMd xmlns="http://www.fsight.ru/PP.SOM.Som">
<tRub xmlns="">
  <id>S1!M!S!R1</id>
  </tRub>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <period>true</period>
  <properties>true</properties>
  </pattern>
  </tArg>
  </GetRubMd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetRubMdResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>S1!M!S!R1</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="5" hf="0">
  <i>TS_DB</i>
  <n>Time series database</n>
  <k>5472</k>
  <c>2822</c>
  <p>5471</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  <openArgs />
  </obInst>
<period>
  <startYear>1980</startYear>
  <endYear>2020</endYear>
  </period>
<properties keepHistory="1" hasMnemonics="1" unitIsRequired="0" hasEmptyAttribute="0" autoUpdateStat="1" lightWeight="0" useDistinctSequence="0" factsOnQuery="0" valuesOnQuery="0" revisionsOnQuery="0" compoundFactorKey="0" separateTableForActualData="0" useDeduplication="0" treatEmptyStringAsNull="0">
<objRdsRepo ds="" isShortcut="0" isLink="0" ver="0" hf="0">
  <i>RDS</i>
  <n>MDM repository</n>
  <k>159</k>
  <c>4353</c>
  <p>51</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </objRdsRepo>
<objUnitsDictionary ds="" isShortcut="0" isLink="0" ver="0" hf="0">
  <i>UNITS_D</i>
  <n>Measurement units</n>
  <k>174</k>
  <c>3076</c>
  <p>159</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </objUnitsDictionary>
<objMeasuresDictionary ds="" isShortcut="0" isLink="0" ver="0" hf="0">
  <i>MEASURES</i>
  <n>Measures</n>
  <k>172</k>
  <c>3076</c>
  <p>159</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </objMeasuresDictionary>
<calendarLevels>
  <it>Year</it>
  <it>Quarter</it>
  <it>Month</it>
  </calendarLevels>
  <firstDayOfWeek>Monday</firstDayOfWeek>
  </properties>
  </meta>
  </GetRubMdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetRubMd" :
{
"tRub" :
{
"id" : "S1!M!S!R1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"period" : "true",
"properties" : "true"
}
}
}
}

JSON response:

{
"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:

Working with Time Series Database