<?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 Jerry on Medium]]></title>
        <description><![CDATA[Stories by Jerry on Medium]]></description>
        <link>https://medium.com/@ogunyemijeremiah?source=rss-40799a8f889------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eynblw3c7xg-VFrNxFD8xw.jpeg</url>
            <title>Stories by Jerry on Medium</title>
            <link>https://medium.com/@ogunyemijeremiah?source=rss-40799a8f889------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:47:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ogunyemijeremiah/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[APACHE AIRFLOW: What it is and why you should start using it]]></title>
            <link>https://medium.com/analytics-vidhya/apache-airflow-what-it-is-and-why-you-should-start-using-it-c6334090265d?source=rss-40799a8f889------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6334090265d</guid>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <dc:creator><![CDATA[Jerry]]></dc:creator>
            <pubDate>Mon, 20 Jul 2020 02:49:06 GMT</pubDate>
            <atom:updated>2020-07-24T13:54:44.388Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction to Apache Airflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPF_70zBWvdhV_G5Ft41Wg.png" /></figure><h4>Introduction</h4><p>What is Apache Airflow?</p><blockquote>Apache Airflow is an open-source platform to Author, Schedule and Monitor <strong>workflows</strong>. It was created at Airbnb in 2015 (as a better way to quickly author, iterate on, and monitor the batch data pipelines handling the massive amount of data being processed at Airbnb).</blockquote><blockquote>Currently Apache Airflow is a part of Apache Software Foundation. Airflow has gained a lot of popularity thanks to its robustness and its flexibility through the use of Python</blockquote><p>Just as J<a href="https://www.linkedin.com/in/jarekpotiuk">AREK POTIUK</a> pointed out, AIRFLOW IS AN ORCHESTRATOR (which can be likened a conductor in an orchestra, it doesn’t do much but controls the flow of everything, He is there to control and synchronize every other person doing the job)</p><p><strong>Okay, cool since apache airflow manages workflow what exactly is Workflow?</strong></p><blockquote>Workflow in its simple sense is a sequence of tasks started on a schedule or triggered by an event</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*K6siD1l_nSh7IQ1dxotRYA.png" /></figure><p>An Airflow workflow is designed as a <a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">directed acyclic graph (DAG).</a> when authoring a workflow, it is divided into tasks which can be executed independently. You can then merge these tasks into a logical whole by combining them into a graph. Each task in a workflow is <a href="https://en.wikipedia.org/wiki/Idempotence">idempotent</a></p><blockquote>In your wandering thoughts you might be thinking what are the benefits of Using airflow</blockquote><h4>Benefits of airflow</h4><ol><li>It can handle upstream/downstream data gracefully</li><li>Easy access to historical data (backfill and rerun for historical data)</li><li>Easy error handling (retry if failure happen)</li><li>It has a Fantastic community (<a href="https://apache-airflow-slack.herokuapp.com/">You can join the airflow community on slack</a>)</li><li>Extendable thought the use of <a href="https://github.com/apache/airflow/tree/master/airflow/contrib/operators">operators</a></li><li>It has Fantastic logging capabilities</li><li>Scalability and dependency management</li><li>Powerful monitoring you can run and view workflow execution in real-time</li><li>Programmatically author, schedule and monitor workflows or data pipelines</li><li>Great Alerting System</li><li>Access through REST API’s</li><li>It can be used locally and in the cloud (which is someone else’s computer 😆 😜)</li></ol><p>Major Cloud service providers for airflow are <a href="https://www.astronomer.io/">ASTRONOMER.IO</a> and<a href="https://cloud.google.com/composer/docs/concepts/overview"> google cloud composer</a></p><h4>Use cases of airflow</h4><p>Apache airflow can be used for various purposes</p><ol><li>ETL (extract, transform, load) jobs</li><li>Extracting data from multiple sources</li><li>Machine Learning pipelines</li><li>Data warehousing</li><li>Orchestrating automated testing</li></ol><p><a href="https://airflow.apache.org/use-cases/">Here are some notable mentions</a></p><h4>Concepts in airflow</h4><ol><li>OPERATORS</li><li>DAG</li><li>TASKS</li><li>CONNECTORS</li><li>HOOKS</li><li>VARIABLES</li><li>XCOM</li><li>EXECUTORS</li></ol><h3>1) OPERATORS</h3><blockquote>An operator describes a single task in a workflow. Operators are usually (but not always) atomic, meaning they can stand on their own and don’t need to share resources with any other operators.</blockquote><blockquote>An operator is simply a Python class with an “execute()” method, which gets called when it is being run.</blockquote><h4>Types of Operators in Airflow</h4><blockquote>i. Action<br>ii. Transfer<br>iii. Sensor</blockquote><h3>2. DAG</h3><blockquote>DAGs describe <em>how</em> to run a workflow.</blockquote><blockquote>DAG is simply a Python script that contains a set of tasks and their dependencies. What each task does is determined by the task’s operator</blockquote><blockquote>Simply put a DAG is a collection of tasks with defined dependencies and relationships</blockquote><p>A <em>DagRun</em> is an instance of a DAG, it is created by scheduler or ut can be triggered manually</p><h3>3.TASKS</h3><blockquote>Tasks are defined in DAGs, and both are written in Python code to define what you want to do.</blockquote><blockquote>What each task does is determined by the task’s <a href="https://airflow.apache.org/docs/stable/_api/airflow/operators/index.html">operator</a></blockquote><h3>4.CONNECTORS</h3><blockquote>The information needed to connect to external systems is stored in the Airflow stores all connectors in its metastore database,</blockquote><blockquote>⭐️ The variable section can also hold these “so-called connection data and parameters” but according to best practices they should be stored as connectors. But guess what? if you are one of those developers that dont love to read documentations you can store them wherever you like</blockquote><h3>5.HOOKS</h3><blockquote>Hooks are used to interact with external systems, like S3, HIVE, SFTP, databases etc.</blockquote><blockquote>All communication with external services are done using hooks</blockquote><pre>operator &lt;-&gt;hooks &lt;-&gt; externalAPI</pre><h3>6. VARIABLES</h3><blockquote>Variables are a generic way to store and retrieve arbitrary content or settings as a simple key-value pair</blockquote><blockquote>This can be likened to <strong><em>environment Variables</em></strong></blockquote><h3>7. XCOM</h3><blockquote>Even though operators are idempotent, they still need to share information or a small amount of data (<strong>operator cross-communication </strong>) and this is where XCOM comes into the picture</blockquote><blockquote>XComs let tasks exchange messages, The name is an abbreviation of “cross-communication”.</blockquote><h3>8. EXECUTORS</h3><blockquote><strong>Executors</strong> are the mechanism by which task instances get to run. <strong>Airflow</strong> has support for various <strong>executors</strong>.</blockquote><blockquote><strong>TYPES OF EXECUTORS</strong><br>1. DebugExecutors (runs tasks in a single process, Simple but not good for production)<br>2. LocalExecutors (runs tasks in a separate process)<br>3. CeleryExecutor (Sends tasks to celery worker hard to set up but best for production)<br>4. KubernetesExecutor (Spawns new pod with airflow and runs task BEST SUITED FOR HEAVY TASKS)</blockquote><blockquote>Executors are very important and at first, the concept might appear complex but there’s a thorough explanation provided by <a href="https://www.astronomer.io/guides/airflow-executors-explained/">Astronomer.io</a></blockquote><h3>CONCLUSION</h3><p>One of the biggest benefits of airflow is that it allows you to programmatically define workflows. It gives users the freedom to write what code to execute at every step of the pipeline.</p><p>Airflow also has a very powerful and well-equipped UI. That makes tracking jobs, backfilling jobs, and configuring the platform an easy task</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DwSG3FG41FtLuwPn" /><figcaption>Photo by <a href="https://unsplash.com/@alexanderredl?utm_source=medium&amp;utm_medium=referral">Alexander Redl</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>READY TO GET STARTED WITH APACHE AIRFLOW?</h4><p>Here’s a quick rundown on how to spin up apache airflow on your local machine</p><p>💡 Airflow is Python-based. The best way to install it is via the tool.</p><pre># airflow needs a home, ~/airflow is the default,<br># but you can lay foundation somewhere else if you prefer<br># (optional)<br>export AIRFLOW_HOME=~/airflow</pre><p>Install from PyPI using pip</p><pre>pip install apache-airflow</pre><p># start the web server, the default port is 8080</p><pre>airflow webserver -p 8080</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8A65dGD2LtJ6WqdQdCl9EQ.png" /><figcaption>Apache Airflow Webserver Log</figcaption></figure><p>Now when you visit 0.0.0.0:8080 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uGC06BHNSG1tuRLuvUn6VA.png" /><figcaption>Apache Airflow UI</figcaption></figure><p><a href="https://www.astronomer.io/docs/cli-quickstart/">Astronomer CLI</a> is also a great tool (actually the easiest way to run Apache Airflow)</p><p>Watch out for more tutorials where I’ll be using the Astronomer CLI to create magic</p><p><strong>Take care, stay safe 🌊 and MAY THE FLOW BE WITH YOU</strong></p><p>✌️ ✌️ 🚀 🚀 ✌️ ✌️</p><p><strong>Further Reading</strong></p><p>A<a href="https://github.com/apache/airflow">pache airflow</a></p><p>A<a href="https://www.astronomer.io/guides/intro-to-airflow/">stronomer.io intro-to-airflow/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6334090265d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/apache-airflow-what-it-is-and-why-you-should-start-using-it-c6334090265d">APACHE AIRFLOW: What it is and why you should start using it</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing pgAdmin 4 on Linux Mint 20 (ulyana)]]></title>
            <link>https://medium.com/@ogunyemijeremiah/installing-pgadmin-4-on-linux-mint-20-ulyana-741b941479c9?source=rss-40799a8f889------2</link>
            <guid isPermaLink="false">https://medium.com/p/741b941479c9</guid>
            <category><![CDATA[database-administration]]></category>
            <category><![CDATA[pgadmin-4]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[linux-mint]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Jerry]]></dc:creator>
            <pubDate>Sat, 11 Jul 2020 19:28:11 GMT</pubDate>
            <atom:updated>2020-09-12T22:39:07.061Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OFRMlG8EQzCKK9tTyp8eLw.png" /><figcaption>pgAdmin4</figcaption></figure><h3>What Exactly is pgAdmin?</h3><blockquote>pgAdmin is a management tool for PostgreSQL and derivative relational databases such as EnterpriseDB’s EDB Advanced Server. It may be run either as a web or desktop application.</blockquote><blockquote><strong>pgAdmin</strong> is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.<br>source(<a href="https://pgadmin.org/">pgadmin.org</a>)</blockquote><p>As at the time of writing this, PgAdmin 4.23 is the latest version and from the official download page, this can be installed using the apt-get install method, though for now only Ubuntu 16.04 (Xenial), 18.04 (Bionic), 19.10 (Eoan), 20.04 (Focal) are officially available through the apt-get method, that leaves a headache for the users of the Latest Linux mint (version codename ulyana).</p><blockquote>I’M SURE THE PGADMIN TEAM IS WORKING ON ADDING apt-get support for ulyana (it&#39;s still relatively new) but this is a workaround to get the latest version of pgAdmin4</blockquote><blockquote><em>This method also works for any Linux version</em></blockquote><pre>Running the command <br>$ cat /etc/os-release <br>can be used to get full details about your Linux os</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*79UwgK6SrR5jEEdRoXfF9g.png" /></figure><h4><strong>Follow the following steps to install pgAdmin4 on your Linux/Ubuntu machine</strong></h4><blockquote><strong>lets Get started</strong></blockquote><ol><li><strong>Update the system</strong></li></ol><p>I&#39;ve seen this on so many installation guides and guess what ill ask you to do first, UPDATE!!!!!</p><figure><img alt="Src: https://giphy.com/" src="https://cdn-images-1.medium.com/max/480/1*6fjmnS0TjWVo0e7NKOH8Hw.gif" /></figure><pre>$ sudo apt-get update</pre><p>2. <strong>install PostgreSQL (if you don&#39;t have it installed already)</strong></p><pre>$ sudo apt-get install postgresql postgresql-contrib</pre><blockquote>Create the username and password for PostgreSQL database. Type the following command in the terminal to add login credentials for the user, Postgres</blockquote><pre>$ sudo -u postgres psql postgres<br># \password postgres</pre><p>3. I<strong>nstall the required packages</strong></p><pre>$ sudo apt-get install build-essential libssl-dev libffi-dev libgmp3-dev</pre><pre>$ sudo apt-get install python3-virtualenv libpq-dev python3-dev</pre><p>4. <strong>Create a virtual environment</strong></p><p>Run the following commands navigate to your home directory, create a new folder named pgAdmin4 and create the virtual environment.</p><pre>$ cd ~<br>$ mkdir pgAdmin4<br>$ cd pgAdmin4<br>$ virtualenv venv</pre><p><strong>5. Activate the virtual environment</strong></p><pre>$ source venv/bin/activate</pre><p><strong>6. Fetch and install the latest version of pgaAdmin4 using pip install</strong></p><pre>$ pip install <a href="https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v4.23/pip/pgadmin4-4.23-py3-none-any.whl">https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v4.23/pip/pgadmin4-4.23-py3-none-any.whl</a><br></pre><p><strong>7. Configure and run pgAdmin 4</strong></p><p>Create a new file named config_local.py in lib/python3.8/site-packages/pgadmin4</p><pre>$ nano venv/lib/python3.8/site-packages/pgadmin4/config_local.py</pre><p>Then add this to the file</p><pre>import os<br>DATA_DIR = os.path.realpath(os.path.expanduser(u&#39;~/.pgadmin/&#39;))<br>LOG_FILE = os.path.join(DATA_DIR, &#39;pgadmin4.log&#39;)<br>SQLITE_PATH = os.path.join(DATA_DIR, &#39;pgadmin4.db&#39;)<br>SESSION_DB_PATH = os.path.join(DATA_DIR, &#39;sessions&#39;)<br>STORAGE_DIR = os.path.join(DATA_DIR, &#39;storage&#39;)<br>SERVER_MODE = False<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jD5IPb-j_xa3R-0r6vlZQA.png" /></figure><p><strong>8. Test the installation by running the command below</strong></p><pre>python venv/lib/python3.8/site-packages/pgadmin4/pgAdmin4.py</pre><p>This should start pgAdmin4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*SM_ke8p_Vn0HR7Mft2FKLQ.png" /></figure><pre>Navigate to 127.0.0.1:5050  to start using pgaAdmin4</pre><p>9. <strong>Create an alias in your </strong>~/.<strong>bashrc file</strong></p><pre>$ echo &quot;alias startPg=&#39;~/pgAdmin4/venv/bin/python ~/pgAdmin4/venv/lib/python3.8/site-packages/pgadmin4/pgAdmin4.py&#39;&quot; &gt;&gt; ~/.bashrc</pre><p>A brief explanation of the above snippet</p><pre>&quot;<em>~/pgAdmin4/venv/bin/python ~/pgAdmin4/venv/lib/python3.8/site-packages/pgadmin4/pgAdmin4.py</em>&quot; is the command we are creating an alias d=for and it can be broken into two parts</pre><pre>1) ~/pgAdmin4/venv/bin/python<br>    This is to use the virtual environment we created earlier without having to &quot;<em>source</em>&quot; it </pre><pre>2) ~/pgAdmin4/venv/lib/python3.8/site-packages/pgadmin4/pgAdmin4.py<br>    This is the command that starts the pgAdmin4 server</pre><p><strong>10. You can easily start The Pgadmin using the “startPg” command</strong></p><pre>$ startPg</pre><h3>Done!</h3><p>we are good to go</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*upds9oU3Sf4AGMZCCJ6s0g.gif" /></figure><blockquote>NB : Using virtual environment isn’t necessary. You can install pgadmin4 as your local package (e.g. at ~/.local/lib/python3.8/site-packages/pgadmin4) instead of installing in a virtual environment. BUT IT IS ADVISABLE TO USE A VIRTUAL ENVIRONMENT</blockquote><p>CREDITS<br><a href="https://www.pgadmin.org/faq/#1">https://www.pgadmin.org/faq</a></p><p><a href="https://www.pgadmin.org/docs/pgadmin4/development/code_overview.html#:~:text=The%20bulk%20of%20pgAdmin%20is,C%2B%2B%20using%20the%20QT%20framework.">https://www.pgadmin.org/docs/</a></p><p><a href="https://giphy.com/">https://giphy.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=741b941479c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>