-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* moves pandas helper to libs * wrapps arrow type instances in list * allows to remove incremental with explicit none, uses column search for simple jsonpath * does not check resource binding when end_value provided * updates arrow docs * fixes aws credentials test * fixes wrappers type tests * bumps version to 0.3.23
- Loading branch information
Showing
17 changed files
with
187 additions
and
105 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
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,7 @@ | ||
from dlt.common.exceptions import MissingDependencyException | ||
|
||
try: | ||
import pandas | ||
from pandas.io.sql import _wrap_result | ||
except ModuleNotFoundError: | ||
raise MissingDependencyException("DLT Pandas Helpers", ["pandas"]) |
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
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 Any | ||
|
||
from dlt.common.typing import NoneType | ||
from dlt.common.exceptions import MissingDependencyException | ||
|
||
|
||
try: | ||
from dlt.common.libs.pandas import pandas | ||
from dlt.common.libs.pyarrow import pyarrow | ||
|
||
PandaFrame, ArrowTable, ArrowRecords = pandas.DataFrame, pyarrow.Table, pyarrow.RecordBatch | ||
except MissingDependencyException: | ||
PandaFrame, ArrowTable, ArrowRecords = NoneType, NoneType, NoneType | ||
|
||
|
||
def wrap_additional_type(data: Any) -> Any: | ||
"""Wraps any known additional type so it is accepted by DltResource""" | ||
# pass through None: if optional deps are not defined, they fallback to None type | ||
if data is None: | ||
return data | ||
|
||
if isinstance(data, (PandaFrame, ArrowTable, ArrowRecords)): | ||
return [data] | ||
|
||
return data |
Oops, something went wrong.