From 9ecaeaf0df65fb352b5e4498d04ca1559676ca30 Mon Sep 17 00:00:00 2001 From: judynah Date: Mon, 2 Dec 2024 12:36:50 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A9=B9=20Update=20docs=20and=20task?= =?UTF-8?q?=20params?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/viadot/orchestration/prefect/tasks/business_core.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/viadot/orchestration/prefect/tasks/business_core.py b/src/viadot/orchestration/prefect/tasks/business_core.py index 4998daf84..19f3e59bf 100644 --- a/src/viadot/orchestration/prefect/tasks/business_core.py +++ b/src/viadot/orchestration/prefect/tasks/business_core.py @@ -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 @@ -14,7 +14,6 @@ @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, @@ -22,10 +21,9 @@ def business_core_to_df( 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 @@ -51,7 +49,6 @@ def business_core_to_df( bc = BusinessCore( url=url, - path=path, credentials=credentials, config_key=config_key, filters=filters, @@ -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 \ No newline at end of file From 583471fd905cdae27bf2a411187de20fb7747865 Mon Sep 17 00:00:00 2001 From: judynah Date: Mon, 2 Dec 2024 12:48:34 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Added=20blank=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/viadot/orchestration/prefect/tasks/business_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viadot/orchestration/prefect/tasks/business_core.py b/src/viadot/orchestration/prefect/tasks/business_core.py index 19f3e59bf..df7ce55ba 100644 --- a/src/viadot/orchestration/prefect/tasks/business_core.py +++ b/src/viadot/orchestration/prefect/tasks/business_core.py @@ -64,4 +64,4 @@ def business_core_to_df( f"Successfully downloaded {nrows} rows and {ncols} columns of data to a DataFrame." ) - return df \ No newline at end of file + return df