<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arthur Prevot on Medium]]></title>
        <description><![CDATA[Stories by Arthur Prevot on Medium]]></description>
        <link>https://medium.com/@arthurprevot?source=rss-1945ab1c7786------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0jxEnb5rqw7A4lttn6s48Q.jpeg</url>
            <title>Stories by Arthur Prevot on Medium</title>
            <link>https://medium.com/@arthurprevot?source=rss-1945ab1c7786------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:03:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arthurprevot/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Yaetos Data Framework Description]]></title>
            <link>https://medium.com/@arthurprevot/yaetos-data-framework-description-ddc71caf6ce?source=rss-1945ab1c7786------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddc71caf6ce</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-warehouse]]></category>
            <category><![CDATA[data-lake]]></category>
            <dc:creator><![CDATA[Arthur Prevot]]></dc:creator>
            <pubDate>Wed, 06 Apr 2022 08:54:54 GMT</pubDate>
            <atom:updated>2022-04-26T08:12:02.047Z</atom:updated>
            <content:encoded><![CDATA[<h4>An open source tool to simplify the creation of data pipelines</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/1*k962hjBMkR5IpDrHmXccGg.jpeg" /></figure><p>Yaetos is a data framework to easily create data pipelines and machine learning models, test them locally, and deploy them to the cloud in AWS (Amazon Web Services). It can be used by anybody working with data, such as data engineers, data analysts, data scientists, analytics engineer, etc. It is implemented in production in 2 companies and I now think it could be useful to others. This post gives technical details on what it is and how to use it.</p><p>The project is based on seeing several data teams in different companies build their own tooling for processing data, often re-coding common functionalities, and often without enough time or resources to make it somewhat generic or feature complete. This tool incorporates best practices seen in large data teams (&gt;100 people) and takes into account the resource limitations in small startups with data teams of 2–3 people.</p><p>It has been used in production for 2+ years in 2 tech companies (Infojobs in Adevinta and The Hotels Network), extracting and processing more than 100 datasets periodically from various sources (mysql, Stripe, Salesforce…), and providing data to various departments like finance, marketing, customer success, product, etc.</p><p>It integrates various AWS services, for storage, compute resources, scheduling, password management, to create data lakes and data warehouses with minimal resources. The core of it is Spark so it inherits all the amazing things available there. Simple jobs can be written in pure SQL, without requiring any knowledge of programming. More complex jobs can leverage the full power of spark and python. The tool name stands for “Yet Another ETL Tool On Spark”.</p><h3><strong>Features</strong></h3><p>They are:</p><ul><li><strong>Integration with all external services necessary</strong> to schedule, execute, and monitor data pipelines in production, in the AWS cloud. Only requirement is to have an account in AWS. No need to host nor maintain services yourself.</li><li>Making simple things easy and complex things possible:<br>– <strong>Simple jobs</strong> can consists of <strong>SQL only</strong>, no knowledge of coding required<br>– <strong>Complex jobs</strong> can use all <strong>pyspark APIs, and python libraries</strong> (pandas, api libs, scikit-learn, tensorflow…).</li><li>Simplification of typical data pipeline workflows:<br>– Making it <strong>easy to go from prototyping </strong>a job on a laptop<strong> to running it in prod</strong> (in the cloud and scheduled) with no changes to pipeline code or parameters.<br>– Handling job <strong>dependencies<br></strong>– Handling <strong>batch and incremental jobs<br></strong>– Providing<strong> a registry of all jobs</strong> and their metadata in an easy to read yaml manifest file.<br>– Outputting<strong> clean logs</strong>, showing input/output paths and fields, setup parameters, and any custom log.<br>– Providing <strong>generic jobs</strong> to perform common operations (ex: copy dataset from A to B, extraction from popular services like Salesforce and Stripe, etc.)</li><li>Support of data engineering best practises:<br>– Supporting <strong>Gitops: </strong>all infrastructure and data pipeline logic is defined in text files, all version controllable. With version printed in job logs by default<br>– Supporting<strong> unit-testing </strong>of data pipeline code and continuous integration<br>– Enabling <strong>pipeline idempotence<br></strong>– Documenting <strong>Field names and types </strong>automatically <strong>in yaml</strong> files</li><li><strong>Cost effectiveness</strong>: Tool is open source, i.e. free. The data lake relies on S3, significantly cheaper than storage in most databases. Compute resources are shut down and don’t incur cost, when not needed.</li><li><strong>Extensibleness</strong>: Yaetos could be updated to add other types of compute resources, like Kubernetes, instead of EMR. It could also be updated to add other types of scheduling, like Airflow, instead of “AWS Data Pipeline”, without having to change data pipeline code.</li></ul><p>The sections below provide more information on the architecture and the internals of the tool.</p><h3>Architecture</h3><p>Yaetos allows pulling data from various sources, processing it and pushing it to various destinations, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/0*dXaVEUnte6uBLUPy" /></figure><p>It is set up to work easily in a data lake architecture. By data lake, we are referring to a file system with all datasets available. This architecture provides advantages over the Data WareHouse (DWH) centred architecture. File system storage is significantly cheaper than analytical database storage and provides more flexibility to organise datasets, to store previous versions of datasets. It is also well suited for the typical data science workflow. Various articles are discussing this architecture (see ref [1], [2], [3], [4], [5], [6]).</p><p>The framework helps keeping things organized by automatically storing new versions in separate folders and by retrieving the latest version by default. It only pushes the latest version or increment to the DWH for consumption by visualisation tools. This allows the DWH to be regenerated from scratch easily if needed. An evolution of that architecture, called Lakehouse, allows querying data lake files directly and makes them available to visualisation tools, removing the need for the DWH, lowering cost and complexity (see ref [7]).</p><p>The framework can be used to extract data from various external systems through APIs or database connections (Salesforce, Stripe, mysql, etc), using already coded generic jobs, or using any python library. It can also be used in conjunction with 3rd party extraction tools like Fivetran or Stitch to take care of the data extraction part in the case of popular 3rd party services.</p><h3>Definition of a job</h3><p>A job can be written in SQL, or in python using framework classes, or in python without using framework classes. The 3 files below showcase these 3 ways of coding jobs in Yaetos. The 3 jobs below achieve the exact same transformation. It shows how a simple job can be written in a concise way, just using a .sql file, not requiring any knowledge of python nor spark. For more complex cases, the jobs can be coded in python, getting access to the full flexibility of spark and python. It is typically useful for API extraction jobs, for machine learning jobs, or for jobs with parts of transformations is common.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/0*qCMBjIBBx1LCdqI4" /></figure><p>The inputs, outputs and other job parameters can be defined in the job file, or in a job registry yaml file as described below.</p><h3>The job registry</h3><p>The job registry consists of a yaml file with important parameters about each job, such as input and output paths, dependencies, scheduling information. It provides a quick way of getting high level information about all jobs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZHIYRSxR03JGgj6K" /></figure><p>The example above shows 2 jobs. The first one takes care of the extraction of a public wikipedia dataset from the web. The 2nd one takes 2 inputs, transforms them, and sends the output to the data lake and in that case to the DWH as well (see “copy_to_redshift” parameter). It has the first job set as a dependency (see “dependency” parameter) so the dependent jobs can be optionally executed earlier.</p><p>The first row of each block consists of the job name. It has to be unique. A python job file can be reused for various jobs in case it needs to be executed with different parameters. It is useful for generic jobs like database extraction jobs, where only inputs and output parameters change.</p><p>Job parameters can be put in the job registry file, in the job file itself (snapshot below), or in the job command line, and will be overridden following that order. This allows quickly changing some parameters directly from the job file or from the command line when writing a new job for example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tDqsQCE3HP2B1Xh-" /></figure><p>The job registry file could be split into several yaml files if needed, to have one per company department for example.</p><h3>Pipeline execution</h3><p>A pipeline is a set of jobs with a dependent relationship. In the most simple case, a pipeline is just one job, with no dependency. The table below shows the different ways of running a job. Running a pipeline is the same, with the addition of the “ — dependencies” argument so dependent jobs are run recursively before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QamTVYptIOtYhozKlnEGeA.png" /></figure><p>No other change is necessary to execute a job locally or in the cloud. All paths will be adjusted to point to local datasets or S3 datasets. All passwords will be pulled from the local password file or from the cloud accordingly as well.</p><p>Paths can also be hardcoded to always use S3 for example. In that case a local execution will pull the datasets from S3 to the laptop and run the transformation on the laptop. It can be used as a quick way to inspect production data from S3 from a laptop.</p><p>When running in the cloud, the framework takes care of pushing the code to AWS, pushing the secrets separately to AWS Secrets, creating an AWS EMR cluster, executing the code on the cluster, and killing the cluster, or optionally leaving it live for easy reuse. The job logs are available in S3. They are set up to not show passwords.</p><p>When running on a schedule, the framework also configures the scheduling tool (AWS Data Pipeline) to create and kill clusters periodically as set in the job registry. The scheduling tool manages retries when execution fails. It shows the status of all pipelines, and gives access to all logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/0*AILiPPbPoIgJOFDp" /></figure><p>Each pipeline may be executed at different times, using different compute resources, and running for a different amount of time, as show below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tBQE-hUHhwQRKy76" /></figure><p>As mentioned earlier, this setup allows minimising the cost of compute resources since they are only paid when executing a job. The level of resources can be set for each job, in a parameter in the job registry file or in the job file itself, or in the command line arguments.</p><p>Here are parameters often used from the command line to execute pipelines or jobs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BYe7ZPldCp4md9QA652Evg.png" /></figure><p>Command line arguments can be used to override any parameter from the job registry or from the job file.</p><h3>Conclusion</h3><p>This post gave some details on Yaetos, an open source data framework interacting with every AWS services needed to setup and operate a data platform, and easily create simple or complex data pipelines, in SQL or in python. It has been used in production for more than 2 years, in 2 different tech companies, and I hope it can be useful to others.</p><p>You can get in touch at <a href="/service/mailto:yaetosdata@gmail.com"><strong>yaetosdata@gmail.com</strong></a> if you want more information. The code is available at <a href="https://github.com/arthurprevot/yaetos">https://github.com/arthurprevot/yaetos</a>. There is a lot of room for improvements, so any contribution is welcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/1*k962hjBMkR5IpDrHmXccGg.jpeg" /></figure><h3>References</h3><ol><li><a href="https://medium.com/@distillerytech/data-warehouse-vs-data-lake-which-is-right-for-your-enterprise-app-development-effort-fa9f046d47ca">https://medium.com/@distillerytech/data-warehouse-vs-data-lake-which-is-right-for-your-enterprise-app-development-effort-fa9f046d47ca</a></li><li><a href="https://towardsdatascience.com/7-reasons-why-you-should-consider-a-data-lake-and-event-driven-etl-7616b74fe484">https://towardsdatascience.com/7-reasons-why-you-should-consider-a-data-lake-and-event-driven-etl-7616b74fe484</a></li><li><a href="https://medium.com/@lackshub/design-patterns-for-data-lakes-d6da14a0af1f">https://medium.com/@lackshub/design-patterns-for-data-lakes-d6da14a0af1f</a></li><li><a href="https://www.sqlchick.com/entries/2016/7/31/data-lake-use-cases-and-planning">https://www.sqlchick.com/entries/2016/7/31/data-lake-use-cases-and-planning</a></li><li><a href="https://medium.com/data-ops/the-data-lake-is-a-design-pattern-888323323c66">https://medium.com/data-ops/the-data-lake-is-a-design-pattern-888323323c66</a></li><li><a href="https://medium.com/analytics-steps/data-lakes-vs-data-warehouse-definition-differences-e066b8850959">https://medium.com/analytics-steps/data-lakes-vs-data-warehouse-definition-differences-e066b8850959</a></li><li><a href="https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html">https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddc71caf6ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>