Skip to content

Commit

Permalink
🩹 Update docs and task params
Browse files Browse the repository at this point in the history
  • Loading branch information
judynah committed Dec 2, 2024
1 parent 2d4277a commit 9ecaeaf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/viadot/orchestration/prefect/tasks/business_core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Task for downloading data from Business Core API to a Parquet file."""
"""Task for downloading data from Business Core API to a pandas DataFrame."""

from typing import Any

Expand All @@ -14,18 +14,16 @@

@task(retries=3, retry_delay_seconds=10, timeout_seconds=60 * 60 * 3)
def business_core_to_df(
path: str | None = None,
url: str | None = None,
filters: dict[str, Any] | None = None,
credentials_secret: str | None = None,
config_key: str | None = None,
if_empty: str = "skip",
verify: bool = True,
) -> DataFrame:
"""Download data from Business Core API to a Parquet file.
"""Download data from Business Core API to a pandas DataFrame.
Args:
path (str, required): Path where to save the Parquet file. Defaults to None.
url (str, required): Base url to the view in Business Core API. Defaults to
None.
filters (dict[str, Any], optional): Filters in form of dictionary. Available
Expand All @@ -51,7 +49,6 @@ def business_core_to_df(

bc = BusinessCore(
url=url,
path=path,
credentials=credentials,
config_key=config_key,
filters=filters,
Expand All @@ -67,4 +64,4 @@ def business_core_to_df(
f"Successfully downloaded {nrows} rows and {ncols} columns of data to a DataFrame."
)

return df
return df

0 comments on commit 9ecaeaf

Please sign in to comment.