View a markdown version of this page

Migrating Apache Impala - Amazon EMR Migration Guide

Migrating Apache Impala

If you are running Apache Impala and looking to migrate it to Amazon EMR, we recommend that you use Amazon Athena or Trino (formerly PrestoSQL). AWS now recommends Trino over PrestoDB for new deployments. Trino is the open-source successor to PrestoSQL, is actively maintained by the community, and receives new features and performance updates. Amazon Athena engine version 3 is built on Trino, providing the same performance foundation with a fully managed, serverless experience. For the considerations for choosing between Amazon Athena and Trino or PrestoDB on Amazon EMR, see Providing Ad Hoc Query Capabilities.

If you must use Impala

If you must use Impala due to a use case not covered by Trino or Athena, you have three options to install Impala:

  • Manually install Impala on Amazon EC2 instances and manage the infrastructure yourself.

  • Use a bootstrap action to install Impala on EMR clusters during cluster launch.

  • Use a third-party cloud provider that installs and manages Impala as a managed service.

Support limitation

Because Impala is not a managed application on Amazon EMR, AWS Support and EMR service teams are not able to support an Impala installation. You are responsible for troubleshooting, maintenance, upgrades, and operational support if you choose to run Impala on AWS infrastructure.

SQL compatibility considerations

Most Impala SQL queries are compatible with Trino and Athena with minimal modifications. Both Trino and Athena support ANSI SQL syntax, which Impala also follows. The following table describes key differences to be aware of during migration.

Impala SQL compatibility with Trino and Athena
Impala SQL feature Trino or Athena equivalent Notes
INVALIDATE METADATA Automatic (AWS Glue) Not required. Athena and Trino see AWS Glue Data Catalog changes instantly.
REFRESH [table] MSCK REPAIR TABLE Use only to register new partitions added directly to Amazon S3.
COMPUTE STATS ANALYZE Essential for the Trino cost-based optimizer to handle large joins.
UPSERT MERGE Requires Apache Iceberg or Delta Lake table formats on Amazon S3.
C++ UDFs (user-defined functions) AWS Lambda or Java UDFs (Athena), or custom Trino UDFs Requires rewriting in Java or Python.
Impala-specific data types ARRAY, MAP, ROW Standardized in Trino and highly compatible with the nested types in Impala. Minor type mapping is required.

For more information about SQL migration, see Migrating from Hive to Trino (Impala SQL is similar to HiveQL) and the Amazon Athena SQL Reference.

Migration decision framework

Use the following framework to determine the best path forward.

Impala migration decision framework
Your requirement Recommended solution Rationale
Serverless, fully managed SQL queries with minimal operational overhead Amazon Athena No infrastructure management, pay-per-query pricing, and automatic scaling.
Need custom configurations, fine-tuned performance, or features not in Athena Trino on Amazon EMR Full control over cluster configuration, custom connectors, and dedicated resources.
Require Impala-specific features with no Trino or Athena equivalent Self-managed Impala on Amazon EC2 Full compatibility, but the highest operational burden.
Legacy applications with deep Impala dependencies Third-party managed Impala service Reduces operational burden while maintaining compatibility.

For more information, see the following documentation references: