Skip to content
This repository was archived by the owner on Mar 13, 2020. It is now read-only.

Commit 7b5c9b5

Browse files
committed
early hacks
1 parent cc88ac6 commit 7b5c9b5

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

modules/DataLoadManager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def start_single_import(self, target_engine, configuration_name, requested_full_
3838
pipeline_configuration['load_table']))
3939
full_refresh = True
4040

41+
#Ask the source to check that ChangeTrackingIsEnabled and valid
42+
#Maybe this returns a flag?
43+
44+
4145
data_load_tracker = DataLoadTracker(configuration_name, json_data, full_refresh)
4246

4347
self.data_source.assert_data_source_is_valid(pipeline_configuration['source_table'],
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from sqlalchemy import Column, DateTime, Integer, String, Boolean, BigInteger
2+
from sqlalchemy.sql import func
3+
from sqlalchemy.ext.declarative import declarative_base
4+
5+
Base = declarative_base()
6+
7+
class BatchExecution(Base):
8+
__tablename__ = 'batch_execution'
9+
id = Column(Integer, primary_key=True)
10+
model_name = Column(String(250), nullable=False)
11+
is_full_refresh = Column(Boolean, nullable=False)
12+
start_synchronization_version = Column(BigInteger, nullable=False)
13+
next_bookmark_synchronization_version = Column(BigInteger, nullable=False)
14+
started_on = Column(DateTime(timezone=True), server_default=func.now())
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import os
2+
import json
3+
import logging
4+
from modules.BatchDataLoader import BatchDataLoader
5+
from modules.DestinationTableManager import DestinationTableManager
6+
from modules.DataLoadTracker import DataLoadTracker
7+
8+
9+
10+
class BatchExecutionManager(object):
11+
def __init__(self, configuration_path, data_source, logger=None):
12+
self.logger = logger or logging.getLogger(__name__)
13+
self.configuration_path = configuration_path
14+
self.data_source = data_source

0 commit comments

Comments
 (0)