Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
Fix bugs in metadata and engine params (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Jan 23, 2020
1 parent 97065f7 commit 1cb3201
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

from setuptools import find_packages, setup

from sqltask import __version__

with io.open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()

setup(
name='sqltask',
version=__version__,
name="sqltask",
version="0.6.4.2",
description="ETL tool based on SqlAlchemy for building robust ETL pipelies with "
"high emphasis on high data quality",
long_description=long_description,
Expand Down
2 changes: 0 additions & 2 deletions sqltask/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from sqltask.base.row_source import BaseRowSource
from sqltask.base.table import BaseOutputRow, BaseTableContext

__version__ = '0.6.3'

# initialize logging
logger = logging.getLogger(__name__)

Expand Down
7 changes: 4 additions & 3 deletions sqltask/base/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ def __init__(self,
metadata_params: Optional[Dict[str, Any]] = None,
):
self.name = name
self.engine = create_engine(url, **engine_params)
self.engine_params = engine_params or {}
self.metadata_params = metadata_params or {}
self.engine = create_engine(url, **self.engine_params)
self.engine_spec = get_engine_spec(self.engine.name)
url_params = self.engine_spec.get_url_params(self.engine.url)
self.database, self.schema = url_params
self.metadata_params = metadata_params or {}
self.metadata = MetaData(
bind=self.engine,
schema=url_params.schema,
Expand Down Expand Up @@ -49,4 +50,4 @@ def create_new(self,
"""
url = make_url(str(self.engine.url))
self.engine_spec.modify_url(url, database=database, schema=schema)
return EngineContext(self.name, str(url), **self.metadata_kwargs)
return EngineContext(self.name, str(url), **self.metadata_params)

0 comments on commit 1cb3201

Please sign in to comment.