would appreciate a few extra set of eyes; I cannot figure out for the life of me why this query won't work, I'm converting Teradata SQL scripts to Hive.
Select a.some_id FROM app_table_dc.seds_thingy_mapping_seds_vdata e
LEFT JOIN app_table_dc.assets a
ON e.eng_serial_number = a.serial_number
AND a.asset_type_id = 2
LEFT JOIN (SELECT vdata_thingy_id
, thingy_date InductDate
FROM app_table_dc.seds_thingy_mapping_seds_vdata
WHERE thingy_type = 'EI') ei
ON ei.vdata_thingy_id = e.vdata_thingy_id
JOIN app_table_dc.engine_type_asset_models am
ON a.asset_model_id = am.asset_model_id
JOIN app_table_dc.engine_type egt
ON am.engine_type_id = egt.engine_type_id
The last two lines do NOT work; when I take them out, it'll run...However with them included, I end up with the error logs to show :
Error Code: 10004, SQL state: TStatus(statusCode:ERROR_STATUS, infoMessages:[*org.apache.hive.service.cli.HiveSQLException:Error while compiling statement: FAILED: SemanticException [Error 10004]: Line 1:4915 Invalid table alias or column reference 'SYNTHJOIN_110d3abf': (possible column names are: blahblahblah)
I made sure the table names being referred to had the correct nomenclature/names, as well as the columns being referred to. I'm at my wits end.
Thank you for any insight in advance!
engine_type_iddo exists in both table and with the same type? - Jainik