init
This commit is contained in:
0
airflow/ods/lm/balancesheet/config/.gitkeep
Normal file
0
airflow/ods/lm/balancesheet/config/.gitkeep
Normal file
102
airflow/ods/lm/balancesheet/config/balancesheet.xsd
Normal file
102
airflow/ods/lm/balancesheet/config/balancesheet.xsd
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://escb.ecb.int/balancesheet"
|
||||
xmlns:lm="http://exdi.ecb.int/lm"
|
||||
targetNamespace="http://escb.ecb.int/balancesheet"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xs:import namespace="http://exdi.ecb.int/lm" schemaLocation="../../lm_common/lm.xsd" />
|
||||
|
||||
<xs:element name="balanceSheetMessage">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="cbBalanceSheet" type="cbBalanceSheet" minOccurs="1" maxOccurs="unbounded" />
|
||||
<xs:element name="eurosystemBalanceSheet" type="eurosystemBalanceSheet" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="cbHeader">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="eurosystemHeader">
|
||||
<xs:sequence>
|
||||
<xs:element name="status" type="status" />
|
||||
<xs:element name="freeText" type="lm:freeText" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="eurosystemHeader">
|
||||
<xs:sequence>
|
||||
<xs:element name="country" type="lm:isoCode" />
|
||||
<xs:element name="referenceDate" type="xs:date" />
|
||||
<xs:element name="version" type="lm:positiveInt" />
|
||||
<xs:element name="dateOfTransmission" type="xs:date" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="cbBalanceSheet">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Represents a balanceSheet for a CB</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="header" type="cbHeader" />
|
||||
<xs:element name="assets" type="balanceSheetItem" minOccurs="1" />
|
||||
<xs:element name="liabilities" type="balanceSheetItem" minOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="eurosystemBalanceSheet">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Represents an aggregated balanceSheet of all CBs</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="header" type="eurosystemHeader" />
|
||||
<xs:element name="assets" type="balanceSheetItem" minOccurs="1" />
|
||||
<xs:element name="liabilities" type="balanceSheetItem" minOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="balanceSheetItem">
|
||||
<xs:sequence>
|
||||
<xs:element name="level" type="lm:positiveInt" />
|
||||
<xs:element name="position" type="lm:positiveInt" />
|
||||
<xs:element name="itemType" type="itemType" minOccurs="0" />
|
||||
<xs:element name="fullyQualifiedPosition" type="fullyQualifiedPosition" minOccurs="0" />
|
||||
<xs:element name="name" type="itemName" minOccurs="0" />
|
||||
<xs:element name="amount" type="lm:amountInEuro" />
|
||||
<xs:element name="item" type="balanceSheetItem" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="itemName">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="200" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="itemType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Asset" />
|
||||
<xs:enumeration value="Liability" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="fullyQualifiedPosition">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="(A|L)(\.([1-9][0-9]*))+" />
|
||||
<xs:maxLength value="200" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="status">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="U" />
|
||||
<xs:enumeration value="B" />
|
||||
<xs:enumeration value="R" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,82 @@
|
||||
# Global configurations
|
||||
tmpdir: /tmp
|
||||
inbox_prefix: INBOX/LM/AggregatedDailyFinancialStatementOfTheEurosystem
|
||||
archive_prefix: ARCHIVE/LM/AggregatedDailyFinancialStatementOfTheEurosystem
|
||||
workflow_name: w_ODS_LM_BALANCESHEET
|
||||
validation_schema_path: '/opt/airflow/src/airflow/dags/ods/lm/balancesheet/config/balancesheet.xsd'
|
||||
file_type: xml
|
||||
|
||||
# List of tasks
|
||||
tasks:
|
||||
- task_name: m_ODS_LM_BALANCESHEET_HEADER_PARSE
|
||||
ods_prefix: INBOX/LM/AggregatedDailyFinancialStatementOfTheEurosystem/LM_BALANCESHEET_HEADER
|
||||
output_table: LM_BALANCESHEET_HEADER
|
||||
namespaces:
|
||||
ns2: 'http://escb.ecb.int/balancesheet'
|
||||
output_columns:
|
||||
- type: 'xpath_element_id'
|
||||
value: '/ns2:balanceSheetMessage/ns2:*'
|
||||
column_header: 'A_KEY'
|
||||
- type: 'workflow_key'
|
||||
column_header: 'A_WORKFLOW_HISTORY_KEY'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage/ns2:*/ns2:header/ns2:country'
|
||||
column_header: 'COUNTRY'
|
||||
is_key: 'N'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage/ns2:*/ns2:header/ns2:referenceDate'
|
||||
column_header: 'REFERENCE_DATE'
|
||||
is_key: 'N'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage/ns2:*/ns2:header/ns2:version'
|
||||
column_header: 'VERSION'
|
||||
is_key: 'N'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage/ns2:*/ns2:header/ns2:status'
|
||||
column_header: 'STATUS'
|
||||
is_key: 'N'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage/ns2:*/ns2:header/ns2:freeText'
|
||||
column_header: 'FREE_TEXT'
|
||||
is_key: 'N'
|
||||
|
||||
|
||||
- task_name: m_ODS_LM_BALANCESHEET_ITEM_PARSE
|
||||
ods_prefix: INBOX/LM/AggregatedDailyFinancialStatementOfTheEurosystem/LM_BALANCESHEET_ITEM
|
||||
output_table: LM_BALANCESHEET_ITEM
|
||||
namespaces:
|
||||
ns2: 'http://escb.ecb.int/balancesheet'
|
||||
output_columns:
|
||||
- type: 'a_key'
|
||||
column_header: 'A_KEY'
|
||||
- type: 'workflow_key'
|
||||
column_header: 'A_WORKFLOW_HISTORY_KEY'
|
||||
- type: 'xpath_element_id'
|
||||
value: '/ns2:balanceSheetMessage/ns2:*'
|
||||
column_header: 'A_HEADER_FK'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage//ns2:level'
|
||||
is_key: 'N'
|
||||
column_header: 'ITEM_LEVEL'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage//ns2:position'
|
||||
is_key: 'N'
|
||||
column_header: 'POSITION'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage//ns2:itemType'
|
||||
is_key: 'N'
|
||||
column_header: 'ITEM_TYPE'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage//ns2:fullyQualifiedPosition'
|
||||
column_header: 'FULLY_QUALIFIED_POSITION'
|
||||
is_key: 'N'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage//ns2:name'
|
||||
column_header: 'NAME'
|
||||
is_key: 'N'
|
||||
- type: 'xpath'
|
||||
value: '/ns2:balanceSheetMessage//ns2:amount'
|
||||
column_header: 'AMOUNT'
|
||||
is_key: 'N'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user