The statement:
CREATE TABLE {table_name}
WITH (format='PARQUET') AS
SELECT
table1.key AS table1_key, table2.key AS table2_key
FROM
{self.left_inventory.table_name} table1
{join_type} JOIN
{self.right_inventory.table_name} table2
USING {key)
fails with the error that table1.key could not be identified. Potentially an Athena Engine 2 issue. However, changing the query to:
CREATE TABLE {table_name}
WITH (format='PARQUET') AS
SELECT
table1.key AS table1_key, table2.key AS table2_key
FROM
{self.left_inventory.table_name} table1
{join_type} JOIN
{self.right_inventory.table_name} table2
ON table1.key = table2.key
worked.
The statement:
fails with the error that table1.key could not be identified. Potentially an Athena Engine 2 issue. However, changing the query to:
worked.