def __init__(self, project_id: str, pipeline_id: str): self.project_id = project_id self.pipeline_id = pipeline_id self.plp_utils = PLPUtil() self.plp_config = PLPConfiguration(project_id, pipeline_id) self.pipeline_config = self.plp_config.get_all_params() self.sender = self.pipeline_config['email_from'] self.receiver = self.pipeline_config['email_to'] self.subject = self.pipeline_config['email_subject']
def __init__(self, project_id: str, batch_id: str, batch_run_id: int): """ Constructor """ self.project_id = project_id self.batch_id = batch_id self.batch_run_id = batch_run_id self.plp_util = PLPUtil()
def __init__(self, project_id: str, batch_id: str): """ Batch Constructor """ self.project_id = project_id self.batch_id = batch_id self.plp_utils = PLPUtil() self.plp_config = PLPConfiguration(project_id, batch_id) self.batch_config = self.plp_config.get_all_params() self.batch_run_id = int(self.batch_config['batch_run_id']) + 1 self.batch_validator = BatchValidator(project_id, batch_id, self.batch_run_id) self.start_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f") self.related_pipelines = self.batch_config['related_pipelines'].split( ",")
def __init__(self, project_id: str, batch_id: str, batch_run_id: str, pipeline_id: str, table_name: str): """ Pipeline Constructor """ self.project_id = project_id self.table_name = table_name self.batch_id = batch_id self.pipeline_id = pipeline_id self.batch_run_id = batch_run_id self.plp_utils = PLPUtil() self.plp_config = PLPConfiguration(project_id, pipeline_id) self.pipeline_config = self.plp_config.get_all_params() self.pipeline_run_id = int(self.pipeline_config['pipeline_run_id']) + 1 self.pipeline_validator = PipelineValidator(self.project_id, self.batch_id, self.pipeline_id, self.batch_run_id, self.pipeline_run_id) self.last_extract_date = datetime.strptime( str(self.pipeline_config['last_extract_date']), '%Y-%m-%d %H:%M:%S.%f') self.start_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")