Skip to content

Commit

Permalink
sharepoint task fail tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinpurtak committed Nov 24, 2023
1 parent 1a42c47 commit cf31f81
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions viadot/flows/sharepoint_to_adls.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,19 @@ def slugify(name):
return name.replace(" ", "_").lower()


class NoDataReturnedError(Exception):
def __init__(self, message):
self.message = message


@task(slug="check_df")
def check_if_df_empty(df):
if len(df.index) == 0:
logger.info("No data in the response. Df empty")

## raise ENDRUN(state=Failed())
raise FAIL("DF IS EMPTY!")
# raise ValueError("DF IS EMPTY!")
# raise FAIL("DF IS EMPTY!")
# raise NoDataReturnedError("DF IS EMPTY!")


class SharepointListToADLS(Flow):
Expand Down

0 comments on commit cf31f81

Please sign in to comment.