Migration commit from heyvince.co to heyvince.ca
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from .config import config as cfg
|
||||
import re
|
||||
|
||||
class SQLLoader():
|
||||
|
||||
def __init__(self, src_name, filepath) -> None:
|
||||
super().__init__(src_name, filepath)
|
||||
|
||||
def _get_initial_load_query(self, query_name, query):
|
||||
match = re.search(r'with ' + query_name + ' as \((.*?)\)', query, re.DOTALL)
|
||||
if match:
|
||||
initial_load_query = match.group(1).strip()
|
||||
return initial_load_query
|
||||
else:
|
||||
return None
|
||||
|
||||
def init_load(self):
|
||||
self._is_table_empty()
|
||||
self._get_initial_load_query(query_name, query)
|
||||
Reference in New Issue
Block a user