Amazon Athena

To query Tableflow tables using Athena, we recommend using Tableflow's AWS Glue integrationarrow-up-right to manage the table. This ensures that the query runs against latest metadata version file.

You can also use the "CREATE TABLE" command directly in Athena. This will create a new Iceberg table and register it with the AWS Glue Data Catalog, but it requires manual updates to the latest metadata version file.

CREATE TABLE [db_name.]table_name
(col_name data_type [COMMENT col_comment] [, ...] ) // schema of table here
LOCATION 's3://demo-bucket/_tableflow/path/to/table'
TBLPROPERTIES (
  'table_type' = 'ICEBERG',
  'format' = 'parquet'
);
circle-info

Athena create table always creates an empty table. Before querying the table, we need to update the table property of "metadata_location" to point to latest metadata version file. Go to AWS Glue Data Catalog -> Tables -> Select your Tableflow table -> Actions -> Edit Table -> update "metadata_location" in Table properties

Last updated

Was this helpful?