simplify constructor for SQL preprocessor

Use sql path from config.
This commit is contained in:
Sarah Hoffmann
2021-04-19 09:38:17 +02:00
parent 8f63f9516b
commit 4fa6c0ad53
6 changed files with 26 additions and 17 deletions

View File

@@ -75,9 +75,9 @@ class SQLPreprocessor: # pylint: disable=too-few-public-methods
and follows its syntax.
"""
def __init__(self, conn, config, sqllib_dir):
def __init__(self, conn, config):
self.env = jinja2.Environment(autoescape=False,
loader=jinja2.FileSystemLoader(str(sqllib_dir)))
loader=jinja2.FileSystemLoader(str(config.lib_dir.sql)))
db_info = {}
db_info['partitions'] = _get_partitions(conn)