-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [BUGFIX] Add support for partition fields of type timestamp (#6) * fix glue partition handling (#2) * Add support for partition fields of type timestamp Co-authored-by: nicor88 <[email protected]> Co-authored-by: yusuf.mahtab <[email protected]> * add changelog and prepare version bump * Get model owner from manifest (#9) * Get model owner from manifest * refactor into private function Co-authored-by: Justas Cernas <[email protected]> Co-authored-by: Justas Cernas <[email protected]> * chore: fix flake8 linting (#10) * Use correct escaper for `INSERT` queries (#18) Copy/paste from: Tomme/dbt-athena#117 Co-authored-by: nicor88 <[email protected]> * fix: share same boto session between every calls (#16) Co-authored-by: nicor88 <[email protected]> * Update CHANGELOG.md Co-authored-by: Daniel Messias <[email protected]> Co-authored-by: yusuf.mahtab <[email protected]> Co-authored-by: Justas Cernas <[email protected]> Co-authored-by: Jérémy Guiselin <[email protected]> Co-authored-by: Owen <[email protected]>
- Loading branch information
1 parent
e10bb7b
commit f4f0ccf
Showing
9 changed files
with
84 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
## v1.0.4 | ||
|
||
### Bugfixes | ||
* Add support for partition fields of type timestamp | ||
* Use correct escaper for INSERT queries | ||
* Share same boto session between every calls | ||
|
||
### Features | ||
* Get model owner from manifest | ||
|
||
## v1.0.3 | ||
* Fix issue on fetching partitions from glue, using pagination |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from typing import Optional | ||
|
||
import boto3.session | ||
from dbt.contracts.connection import Connection | ||
|
||
|
||
__BOTO3_SESSION__: Optional[boto3.session.Session] = None | ||
|
||
|
||
def get_boto3_session(connection: Connection = None) -> boto3.session.Session: | ||
def init_session(): | ||
global __BOTO3_SESSION__ | ||
__BOTO3_SESSION__ = boto3.session.Session( | ||
region_name=connection.credentials.region_name, | ||
profile_name=connection.credentials.aws_profile_name, | ||
) | ||
|
||
if not __BOTO3_SESSION__: | ||
if connection is None: | ||
raise RuntimeError( | ||
'A Connection object needs to be passed to initialize the boto3 session for the first time' | ||
) | ||
init_session() | ||
|
||
return __BOTO3_SESSION__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters