SetRubMd

Syntax

SetRubMdResult SetRubMd(RubId tRub, SetRubMdArg tArg)

Parameters

tRub. Opened time series database instance moniker.

tArg. Parameters for changing metadata.

Description

The SetRubMd operation changes metadata of time series database.

Comments

To execute the operation, in the tRub field specify moniker of opened time series database instance, and in the tArg field specify changing parameters. The moniker can be obtained on executing the OpenRub operation. In the tArg.pattern field specify the pattern that will be used to make changes, and in the tArg.meta field specify the updated data and metadata. To save changes after executing the SetRubMd operation execute the SaveObject or SaveObjectAs operation.

The SetRubMd operation results in the time series database moniker and the updated metadata that can be requested in the tArg.metaGet pattern.

Example

Below is the example of changing time series database properties. The request contains time series database moniker and new property values. The response contains the updated information about all properties specified for time series database.

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">
<SetRubMd 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>
<meta>
<properties useDeduplication="true">
<calendarLevels>
  <it>Month</it>
  <it>Quarter</it>
  <it>Year</it>
  </calendarLevels>
  </properties>
  </meta>
<metaGet>
  <obInst>true</obInst>
  <period>true</period>
  <properties>true</properties>
  </metaGet>
  </tArg>
  </SetRubMd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetRubMdResult 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="1" 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>
  </SetRubMdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetRubMd" :
{
"tRub" :
{
"id" : "S1!M!S!R1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"period" : "true",
"properties" : "true"
},
"meta" :
{
"properties" :
{
"@useDeduplication" : "true",
"calendarLevels" :
{
"it" :
[
"Month",
"Quarter",
"Year"
]
}
}
},
"metaGet" :
{
"obInst" : "true",
"period" : "true",
"properties" : "true"
}
}
}
}

JSON response:

{
"SetRubMdResult" :
{
"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" : "1",
"@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 SetRubMdResult SetRubMetadata(RubId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetRubMd()
{
tArg = new SetRubMdArg()
{
pattern = new RubMdPattern()
{
properties = true
},
meta = new RubMd()
{
properties = new RubProperties()
{
calendarLevels = new DimCalendarLvl[]
{
DimCalendarLvl.Month,
DimCalendarLvl.Quarter,
DimCalendarLvl.Year
},
useDeduplication = true,
useDeduplicationSpecified = true
}
},
metaGet = new RubMdPattern()
{
properties = true
}
},
tRub = moniker
};
//Change time series database metadata
var result = somClient.SetRubMd(tSet);
return result;
}

See also:

Working with Time Series Database