Skip to content

Instantly share code, notes, and snippets.

View natarajanc's full-sized avatar

Natarajan Chakrapani natarajanc

View GitHub Profile
@natarajanc
natarajanc / etl_dag_template.py
Last active November 19, 2018 15:40
Template DAG function for ELT/ETL pipeline
from datetime import timedelta
from airflow import DAG
from dw_airflow.airflow_utils import etl_helpers # internal helper module
def create_dag(dag_id, dag_schedule, dag_start_date, data_source, notify_always=True):
"""
Create ELT DAG from template based on data source and env
Args:
{
"metadata": {
"name": "soccer interactive"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "soccer interactive"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=2>
# Soccer 101 - Player Positions
# <codecell>
from IPython.core.display import Image