Skip to content

Commit

Permalink
📝 updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
angelika233 committed Oct 2, 2023
1 parent 37909e0 commit 63dd311
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions viadot/tasks/cloud_for_customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,21 @@ def run(
vault_name: str = None,
):
"""
Task for downloading data from the Cloud for Customers to a pandas DataFrame using normal URL (with query parameters).
This task grab data from table from 'scratch' with passing table name in url or endpoint. It is rocommended to add
some filters parameters in this case.
Task for downloading data from the Cloud for Customers to a pandas DataFrame using URL (with query parameters).
Data is obtained from table by passing table name in the url or endpoint. It is recommended to add filters
parameters in this case.
Example:
url = "https://mysource.com/sap/c4c/odata/v1/c4codataapi"
endpoint = "ServiceRequestCollection"
params = {"$filter": "CreationDateTime ge 2021-12-21T00:00:00Z"}
Args:
url (str, optional): The url to the API in case of prepared report. Defaults to None.
env (str, optional): The environment to use. Defaults to 'QA'.
url (str, optional): The url to the API used in case of prepared report. Defaults to None.
env (str, optional): The environment to use to obtain credentials. Defaults to 'QA'.
endpoint (str, optional): The endpoint of the API. Defaults to None.
fields (List[str], optional): The C4C Table fields. Defaults to None.
params (Dict[str, str]): Query parameters. Defaults to $format=json.
params (Dict[str, str]): Query parameters. Defaults to None.
chunksize (int, optional): How many rows to retrieve from C4C at a time. Uses a server-side cursor.
if_empty (str, optional): What to do if query returns no data. Defaults to "warn".
credentials_secret (str, optional): The name of the Azure Key Vault secret containing a dictionary
Expand Down Expand Up @@ -211,7 +211,9 @@ def run(

def _generate_chunks() -> Generator[pd.DataFrame, None, None]:
"""
Util returning chunks as a generator to save memory.
Util function returning chunks.
Returns: Generator[pd.DataFrame, None, None]
"""
offset = 0
total_record_count = 0
Expand Down

0 comments on commit 63dd311

Please sign in to comment.