Whitepaper on Principles of container-based application design by Red Hat

Good read – https://www.redhat.com/en/resources/cloud-native-container-design-whitepaper

Cloud-native” is a term used to describe applications designed specifically to run on a cloud-based infrastructure. Typically, cloud-native applications are developed as loosely coupled microservices running in containers managed by platforms. These applications anticipate failure, and they run and scale reliably even when their underlying infrastructure is experiencing outages. To offer such capabilities, cloud-native platforms impose a set of contracts and constraints on the applications running on them. These contracts ensure that the applications conform to certain constraints and allow the platforms to automate the management of the containerized applications.

Join two XML files using XSL Transformation

This blog demonstrates how you can JOIN (yes, like in SQL) two xml (datasets) to one using a common ID (relationship).

shop.xml

[code lang=”xml”]
<?xml version=”1.0″ encoding=”UTF-8″?>
<?xml-stylesheet type=’text/xsl’ href=’main.xsl’?>
<shop>
<product>
<id>100</id>
<title>hello</title>
</product>

<product>
<id>101</id>
<title>world</title>
</product>
<product>
<id>102</id>
<title>praveen</title>
</product>
</shop>
[/code]

price.xml

[code lang=”xml”]

<?xml version=”1.0″ encoding=”UTF-8″?>
<shop>
<product>
<id>100</id>
<price>10.0</price>
</product>
<product>
<id>101</id>
<price>10.1</price>
</product>
<product>
<id>102</id>
<price>10.2</price>
</product>
<product>
<id>103</id>
<price>10.3</price>
</product>

</shop>
[/code]

main.xsl

[code lang=”xml”]
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”>
<xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ indent=”yes” />

<xsl:param name=”fileName” select=”‘price.xml'” />

<xsl:variable name=”updateItems” select=”document($fileName)/shop/product” />

<xsl:template match=”@*|node()”>
<xsl:copy>
<xsl:apply-templates select=”@*|node()” />
<xsl:copy-of select=”$updateItems[id=current()/id]/price” />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
[/code]

Resulting XML, after transformation should look like:

[code lang=”xml”]
<?xml version=”1.0″ encoding=”utf-8″?>
<?xml-stylesheet type=’text/xsl’ href=’main.xsl’?>
<shop>
<product>
<id>100</id>
<title>hello</title>
<price>10.0</price>
</product>
<product>
<id>101</id>
<title>world</title>
<price>10.1</price>
</product>
<product>
<id>102</id>
<title>praveen</title>
<price>10.2</price>
</product>
</shop>
[/code]

Bonus code, if some .net developers want a transformation code:

[code lang=”csharp”]
XslTransform xslt = new XslTransform();
xslt.Load(@”D:\Websites\xmltest\main.xsl”);
xslt.Transform(@”D:\Websites\xmltest\shop.xml”, @”D:\Websites\xmltest\out.xml”);
textBox1.Text = System.IO.File.ReadAllText(@”D:\Websites\xmltest\out.xml”);
[/code]

SSAS: Dimension Relationships in Cubes

“Dimension relationship” refers to the direct or indirect relationships between dimension and its measure groups in a Cube.

Regular Refers to a standard relationship, when a Key column in the dimension is directly joined to fact table.
Reference When a Key column in the dimension is indirectly joined to fact table by referencing another dimension.
Fact / Degenerate Dimensions constructed from attribute columns in fact tables than from attribute columns in dimension tables.
Many-to-Many One dimension is associated with multiple facts

Read more: https://docs.microsoft.com/en-us/sql/analysis-services/multidimensional-models-olap-logical-cube-objects/dimension-relationships?view=sql-server-2017

Note: My study notes

Shu-Ha-Ri technique of Learning

Shu Ha Ri is a learning model, or technique where at first (Shu) he/she follows a master and does the activities without knowing the why factor. He follows only one way of doing an activity even though there are different and efficient ways to accomplish same. Later (Ha) he learns more about the underlying details and starts to learn from different sources or masters and starts to do activities more efficiently. At the final stage (Ri) he starts to think of their own and builds his on ways of doing things within his comfort zone.