Giter Club home page Giter Club logo

attempt_apacheairflow's Introduction

ApacheAirflow

Exploring and creating workflows in Apache Airflow workflows

Apache Airflow is python-based workflow based management system developed by Airbnb.
Workflows can be used to automate the pipelines, ETL process. It uses Directed Acyclic Graphs (DAGs) to define worfklows.
A brief understanding of Airflow DAGs.

Note:

  • Airflow scheduler runs the DAGs for the given/scheduled time, if the DAG run is successfull we cannot trigger for the same timestamp.
  • Airflow SubDAGs are recommended not be used because SubDagOperator and tasks are independent of parent DAG.

Further reading can be done here -
[1]: https://airflow.apache.org/docs/stable/index.html
[2]: Airflow use case from Lyft
[3]: Airflow Operators and Hooks
[4]: Snowflake connector
[5]: Connecting to Snowflake using Airflow
[6]: Airflow SubDAGs
[7]: Slack integration


For monitoring the DAGs and tasks

Airflow can send metrics to StatsD.
StatsD can send data to backend service for further visualisation and analysis (ex. Datadog). StatsD is composed of three components - client, server and backend.
It sends metrics in UDP packets, if metrics are very important one needs to use TCP connection/client for sending metrics (recently added to StatsD).

Useful commands: To listen to StatsD connection on port 8125

while true; do nc -l localhost 8125; done

Integrating the Datadog with Airflow:
Datadog is a monitoring service. It gets data from StatsD daemon of Airflow and DatadogD daemon sends these data to cloud host.
We can use Datadog for viewing/visualising the metric data and enhancing querying on the metric data.

Setup -

  1. Airflow integration with DataDog
  2. Datadog agent setup/check

Config and mapping files:

  • Check the configuration file for airflow - airflow.cfg
  • And also check for Datadog and StatsD mapping - datadog.yml

Further reading on StatsD -
[1]: Setup Metrics for Airflow using StatsD
[2]: https://thenewstack.io/collecting-metrics-using-statsd-a-standard-for-real-time-monitoring/
[3]: Python StatsD documentation
[4]: https://sysdig.com/blog/monitoring-statsd-metrics/
[5]: https://www.scalyr.com/blog/statsd-measure-anything-in-your-system/
[6]: Datadog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.