Skip to content

Commit cccc148

Browse files
authored
Merge pull request #1956 from LBHackney-IT/di-459-create-refined-gx-output-dataset
Add new column with a clean human readable dataset name
2 parents e37395b + 8343f18 commit cccc148

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/jobs/housing/housing_apply_gx_dq_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ def main():
127127
# map DQ dimension type
128128
results_df['dq_dimension_type'] = results_df['expectation_type'].map(dq_dimensions_map)
129129

130+
# add clean dataset name
131+
results_df['table_name'] = results_df['kwargs.batch_id'].map(
132+
lambda x: x.removeprefix('pandas-').removesuffix('_df_asset'))
133+
130134
results_df['import_year'] = datetime.today().year
131135
results_df['import_month'] = datetime.today().month
132136
results_df['import_day'] = datetime.today().day

0 commit comments

Comments
 (0)