First commit
This commit is contained in:
BIN
Automate+Pipelines/plugins/operators/.DS_Store
vendored
Normal file
BIN
Automate+Pipelines/plugins/operators/.DS_Store
vendored
Normal file
Binary file not shown.
11
Automate+Pipelines/plugins/operators/__init__.py
Normal file
11
Automate+Pipelines/plugins/operators/__init__.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from operators.stage_redshift import StageToRedshiftOperator
|
||||
from operators.load_fact import LoadFactOperator
|
||||
from operators.load_dimension import LoadDimensionOperator
|
||||
from operators.data_quality import DataQualityOperator
|
||||
|
||||
__all__ = [
|
||||
'StageToRedshiftOperator',
|
||||
'LoadFactOperator',
|
||||
'LoadDimensionOperator',
|
||||
'DataQualityOperator'
|
||||
]
|
||||
22
Automate+Pipelines/plugins/operators/data_quality.py
Normal file
22
Automate+Pipelines/plugins/operators/data_quality.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from airflow.hooks.postgres_hook import PostgresHook
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
class DataQualityOperator(BaseOperator):
|
||||
|
||||
ui_color = '#89DA59'
|
||||
|
||||
@apply_defaults
|
||||
def __init__(self,
|
||||
# Define your operators params (with defaults) here
|
||||
# Example:
|
||||
# conn_id = your-connection-name
|
||||
*args, **kwargs):
|
||||
|
||||
super(DataQualityOperator, self).__init__(*args, **kwargs)
|
||||
# Map params here
|
||||
# Example:
|
||||
# self.conn_id = conn_id
|
||||
|
||||
def execute(self, context):
|
||||
self.log.info('DataQualityOperator not implemented yet')
|
||||
22
Automate+Pipelines/plugins/operators/load_dimension.py
Normal file
22
Automate+Pipelines/plugins/operators/load_dimension.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from airflow.hooks.postgres_hook import PostgresHook
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
class LoadDimensionOperator(BaseOperator):
|
||||
|
||||
ui_color = '#80BD9E'
|
||||
|
||||
@apply_defaults
|
||||
def __init__(self,
|
||||
# Define your operators params (with defaults) here
|
||||
# Example:
|
||||
# conn_id = your-connection-name
|
||||
*args, **kwargs):
|
||||
|
||||
super(LoadDimensionOperator, self).__init__(*args, **kwargs)
|
||||
# Map params here
|
||||
# Example:
|
||||
# self.conn_id = conn_id
|
||||
|
||||
def execute(self, context):
|
||||
self.log.info('LoadDimensionOperator not implemented yet')
|
||||
22
Automate+Pipelines/plugins/operators/load_fact.py
Normal file
22
Automate+Pipelines/plugins/operators/load_fact.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from airflow.hooks.postgres_hook import PostgresHook
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
class LoadFactOperator(BaseOperator):
|
||||
|
||||
ui_color = '#F98866'
|
||||
|
||||
@apply_defaults
|
||||
def __init__(self,
|
||||
# Define your operators params (with defaults) here
|
||||
# Example:
|
||||
# conn_id = your-connection-name
|
||||
*args, **kwargs):
|
||||
|
||||
super(LoadFactOperator, self).__init__(*args, **kwargs)
|
||||
# Map params here
|
||||
# Example:
|
||||
# self.conn_id = conn_id
|
||||
|
||||
def execute(self, context):
|
||||
self.log.info('LoadFactOperator not implemented yet')
|
||||
26
Automate+Pipelines/plugins/operators/stage_redshift.py
Normal file
26
Automate+Pipelines/plugins/operators/stage_redshift.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from airflow.hooks.postgres_hook import PostgresHook
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
class StageToRedshiftOperator(BaseOperator):
|
||||
ui_color = '#358140'
|
||||
|
||||
@apply_defaults
|
||||
def __init__(self,
|
||||
# Define your operators params (with defaults) here
|
||||
# Example:
|
||||
# redshift_conn_id=your-connection-name
|
||||
*args, **kwargs):
|
||||
|
||||
super(StageToRedshiftOperator, self).__init__(*args, **kwargs)
|
||||
# Map params here
|
||||
# Example:
|
||||
# self.conn_id = conn_id
|
||||
|
||||
def execute(self, context):
|
||||
self.log.info('StageToRedshiftOperator not implemented yet')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user