Declarative Data Warehouse setup in PygramETL
Author
Mathiasen, Simon
Term
4. term
Education
Publication year
2023
Submitted on
2023-06-16
Pages
13
Abstract
Before building Extract-Transform-Load (ETL) processes, a data warehouse must be created in a database management system, and its schema must be implemented in an ETL framework so data can be loaded correctly from sources. This setup is labor-intensive and becomes more complex as schemas grow, because the database schema and the ETL definitions have to match exactly. This thesis presents DeclarativeETL, an extension to PygramETL that automatically generates both DDL scripts (database creation) and the corresponding Python ETL code from a single shared declarative specification. It uses TOML, a simple configuration language, and a concise syntax so developers only need to name dimension tables and fact tables, their attributes and measures, and optionally set defaults such as schema type and attribute/measure types. Sensible defaults save many keystrokes because most fields share the same type. In evaluation, DeclarativeETL is fast and lightweight, and it more than doubles productivity—measured by lines of code—compared with writing DDL and PygramETL code by hand.
Før man kan bygge Extract-Transform-Load (ETL) processer, skal der oprettes et datalager i et databasesystem, og datastrukturen (skemaet) skal implementeres i et ETL-framework, så data kan indlæses korrekt fra kilderne. Denne opsætning er tidskrævende og bliver mere kompleks, jo større skemaet er, fordi database-skema og ETL-definitioner skal passe nøjagtigt sammen. Denne afhandling præsenterer DeclarativeETL, en udvidelse til PygramETL, som automatisk genererer både DDL-scripts (databaseoprettelse) og den tilsvarende Python-kode til PygramETL fra én fælles deklarativ specifikation. Løsningen bruger TOML, et enkelt konfigurationssprog, og en enkel syntaks, så udviklere blot skal navngive dimensionstabeller og faktatabeller samt deres attributter og målinger og eventuelt angive standardværdier som skematype og attribut-/måletyper. Fornuftige standarder sparer mange tastetryk, fordi de fleste felter deler samme type. Evalueringen viser, at DeclarativeETL er hurtig og letvægts og kan øge produktiviteten med over 100 % målt på antal kodelinjer sammenlignet med at skrive DDL og PygramETL-kode manuelt.
[This apstract has been rewritten with the help of AI based on the project's original abstract]
Keywords
