Closed nehanene15 closed 1 month ago
Issue stems here: https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/develop/data_validation/clients.py#L146
If I print (iq.columns)
, it returns ['t0.id', 't0.name']
when it should be ['id', 'name']
Possible fix is to remove t0 by adding below line. prefix which is getting generate at this function
cur.description = [(x[0].replace('t0.', '', 1), *x[1:]) for x in cur.description]
Initial test worked fine. But need thorough testing.
cc - @piyushsarraf
When running custom-query column or row validations, the query generated is invalid. It appends a "t0" prefix to the column names which creates an invalid query.
Command to reproduce:
Query generated:
Error:
impala.error.HiveServer2Error: Error while compiling statement: FAILED: SemanticException [Error 10002]: Line 3:12 Invalid column reference 't0.id'
We should add a custom query integration test for Hive as part of this PR.