Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurprevot committed Jun 16, 2024
1 parent 1ef6a09 commit 098e587
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jobs/generic/compare_pandas_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def transform(self, tableA, tableB):
print(message)
return pd.DataFrame()

# Comparing dataset content, fuzzy
# Comparing dataset content, fuzzy
pks1 = self.jargs.inputs['tableA']['pk']
pks2 = self.jargs.inputs['tableB']['pk']
compare1 = list(set(tableA.columns) - set(pks1))
Expand Down
3 changes: 1 addition & 2 deletions yaetos/etl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ def check_pk(df, pks, df_type='spark'):
logger.info("Given fields ({}) are PKs (i.e. unique). count=count_pk={}".format(pks, count))
return True
elif df_type == 'pandas':
count =len(df)
count = len(df)
count_pk = len(df[pks].drop_duplicates())
if count != count_pk:
logger.error("Given fields ({}) are not PKs since not unique. count={}, count_pk={}".format(pks, count, count_pk))
Expand All @@ -786,7 +786,6 @@ def check_pk(df, pks, df_type='spark'):
else:
raise Exception(f"shouldn't get here, set df_type to 'spark' or 'pandas'. It is set in {df_type}")


def identify_non_unique_pks(self, df, pks):
return su.identify_non_unique_pks(df, pks)

Expand Down
2 changes: 1 addition & 1 deletion yaetos/libs/generic_jobs/compare_pandas_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def transform(self, tableA, tableB):
print(message)
return pd.DataFrame()

# Comparing dataset content, fuzzy
# Comparing dataset content, fuzzy
pks1 = self.jargs.inputs['tableA']['pk']
pks2 = self.jargs.inputs['tableB']['pk']
compare1 = list(set(tableA.columns) - set(pks1))
Expand Down

0 comments on commit 098e587

Please sign in to comment.