JustPaste.it

xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="feature_req" version="21.3" modified="1647249094998" modifiedBy="fooo" olapId="p125">
  <headers>
    <header name="comment" modified="1647247688033" modifiedBy="fooo">
      <comment><![CDATA[Project description]]></comment>
    </header>
  </headers>
  <variables />
  <connections />
  <extracts>
    <extract modified="1647247929518" name="EX_CT_1" type="ConstantTable" modifiedBy="fooo">
      <data>
        <header>
          <value>Period</value>
          <value>Country</value>
          <value>Version</value>
          <value>Product</value>
          <value>#Value</value>
        </header>
        <row>
          <value>2022-01</value>
          <value>France</value>
          <value>Actual</value>
          <value>Car</value>
          <value>12000</value>
        </row>
        <row>
          <value>2022-02</value>
          <value>France</value>
          <value>Actual</value>
          <value>Car</value>
          <value>13000</value>
        </row>
        <row>
          <value>2022-03</value>
          <value>France</value>
          <value>Actual</value>
          <value>Car</value>
          <value>14000</value>
        </row>
        <row>
          <value>2022-04</value>
          <value>France</value>
          <value>Actual</value>
          <value>Car</value>
          <value>15000</value>
        </row>
        <row>
          <value>2022-05</value>
          <value>France</value>
          <value>Actual</value>
          <value>Car</value>
          <value>16000</value>
        </row>
        <row>
          <value>2022-06</value>
          <value>France</value>
          <value>Actual</value>
          <value>Car</value>
          <value>17000</value>
        </row>
      </data>
    </extract>
  </extracts>
  <transforms>
    <transform modified="1647248042744" name="TD_1" type="TableDenormalization" modifiedBy="fooo">
      <sources>
        <source nameref="EX_CT_1" />
      </sources>
      <target>
        <coordinates keepSourceOrder="false">
          <coordinate>
            <input nameref="Country" />
          </coordinate>
          <coordinate>
            <input nameref="Version" />
          </coordinate>
          <coordinate>
            <input nameref="Product" />
          </coordinate>
        </coordinates>
        <measures aggregate="sum" denormalize="Period" source="TA_distinct_period" />
      </target>
      <cache>false</cache>
    </transform>
    <transform modified="1647248014322" name="TA_distinct_period" type="TableAggregation" modifiedBy="fooo">
      <sources>
        <source nameref="EX_CT_1" />
      </sources>
      <target>
        <coordinates keepSourceOrder="false">
          <coordinate>
            <input nameref="Period" />
          </coordinate>
        </coordinates>
      </target>
      <cache>false</cache>
    </transform>
    <transform modified="1647249094998" name="FT_extraColumns" type="FieldTransform" modifiedBy="fooo">
      <comment><![CDATA[let's say that I want the following structure:
Country | Version | <denormalized periods> | Product | extraColumn1. I try with the following regex:
Country|Version|[0-9]{4}\-[0-9]{2}|Product|extraColumn1

=> the order of the columns will not be taken into account]]></comment>
      <sources>
        <source nameref="TD_1" />
      </sources>
      <functions>
        <function name="helper1" type="Groovy">
          <parameters>
            <buffered>true</buffered>
            <type>String</type>
            <script><![CDATA[return 'foo';]]></script>
            <nullDefaults>false</nullDefaults>
          </parameters>
        </function>
        <function name="extraColumn1" type="Groovy">
          <inputs>
            <input nameref="helper1" type="String" />
          </inputs>
          <parameters>
            <buffered>true</buffered>
            <type>String</type>
            <script><![CDATA[return _input1 + '1';]]></script>
            <nullDefaults>false</nullDefaults>
          </parameters>
        </function>
      </functions>
      <target>
        <coordinates include="Country|Version|[0-9]{4}\-[0-9]{2}|Product|extraColumn1" />
      </target>
      <cache>false</cache>
    </transform>
  </transforms>
  <loads />
  <jobs />
</project>