AWS Glue catalog
A Glue catalog connects an AWS Glue Data Catalog, so its databases appear in Gravitino as schemas and its Hive, Iceberg, Delta, and Parquet tables can be listed, created, altered, and governed. Changes are written to Glue, where Athena, EMR, Spark, and Trino see them.
Quick start
The example connects the Glue Data Catalog in us-east-1 as the catalog glue_catalog and lists its
databases as schemas, then the tables in one of them. Without an access key in the request, the
server reaches Glue with the default AWS credential chain, such as the pod's IAM role.
- UI
- REST
-
Start the catalog. Open Connect → Catalogs and click + Catalog. Enter
glue_catalogas the Catalog name. -
Choose the provider. Keep Relational as the Catalog type and choose AWS Glue under Metastores and catalog services in Select provider. Under Connection, enter
us-east-1as the AWS region ands3://{bucket}/warehouseas the Warehouse. Leave Access key ID and Secret access key blank to use the server's default AWS credentials. -
Create the catalog. Click Test connection, then Create catalog.
-
Browse the catalog. Open Explore and open
glue_catalogto list its Glue databases as schemas. Open a schema to list its tables.
-
Create the catalog.
warehouseis where tables created through Gravitino go when neither the table nor its database names a location.Create a Glue catalogcurl -sS -X POST "https://{gravitino_host}/api/metalakes/{metalake}/catalogs" \
-H "Accept: application/vnd.gravitino.v1+json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"name": "glue_catalog",
"type": "RELATIONAL",
"provider": "glue",
"comment": "AWS Glue Data Catalog",
"properties": {
"aws-region": "us-east-1",
"warehouse": "s3://{bucket}/warehouse"
}
}'To use a static key instead, add
aws-access-key-idandaws-secret-access-key. -
List the schemas. They are the Glue databases, with names in lowercase.
List the schemas in the catalogcurl -sS "https://{gravitino_host}/api/metalakes/{metalake}/catalogs/glue_catalog/schemas" \
-H "Accept: application/vnd.gravitino.v1+json" \
-H "Authorization: Bearer $TOKEN" -
List the tables in a database. Hive, Iceberg, Delta, and Parquet tables are all listed, unless
table-format-filternarrows them.List the tables in a schemacurl -sS "https://{gravitino_host}/api/metalakes/{metalake}/catalogs/glue_catalog/schemas/{database}/tables" \
-H "Accept: application/vnd.gravitino.v1+json" \
-H "Authorization: Bearer $TOKEN"
Requirements
- Network access from the Gravitino server pod to the AWS Glue API, directly or through a VPC
endpoint set in
aws-glue-endpoint. - AWS credentials with the IAM permissions below: either an access key in the
catalog properties, or the default AWS credential chain of the server pod. On EKS, the default
chain picks up an IAM role given to the server's service account through
gravitino.serviceAccount.annotations; see Customize the Helm chart.
Schema and table names are case-insensitive, because Glue stores database and table names in lowercase.
Catalog
Capabilities
The Glue catalog supports creating, updating, and deleting databases and tables in the AWS Glue Data Catalog.
- Supports all table types stored in Glue (Hive, Iceberg, Delta, Parquet, and others) by default.
- Supports Hive-format table partitioning, bucketing, and sort orders.
- Does not support views. Glue views (tables with
TableType=VIRTUAL_VIEW) are filtered out.
Properties
Besides the common catalog properties, the Glue catalog has the following properties:
| Property Name | Description | Default Value | Required | Immutable |
|---|---|---|---|---|
aws-region | AWS region for the Glue Data Catalog (e.g. us-east-1). | (none) | Yes | Yes |
aws-glue-catalog-id | The 12-digit AWS account ID that owns the Glue catalog. When omitted, defaults to the caller's AWS account ID. | (none) | No | Yes |
aws-access-key-id | AWS access key ID for static credential authentication. When omitted, the default credential chain is used. | (none) | No | No |
aws-secret-access-key | AWS secret access key paired with aws-access-key-id. When omitted, the default credential chain is used. | (none) | No | No |
aws-glue-endpoint | Glue endpoint to call instead of the regional default, such as a VPC endpoint URL. | (none) | No | No |
warehouse | Base storage path used as the warehouse when no explicit location is specified at table creation time (e.g. s3://my-bucket/warehouse). Table location is derived as warehouse/database/table. | (none) | Yes | No |
default-table-format | Default format for tables created via Gravitino's createTable() API. Accepted values: iceberg, hive. | hive | No | No |
table-format-filter | Comma-separated list of table formats exposed by listTables() and loadTable(). Accepted values: all, hive, iceberg, delta, parquet. Use to restrict visible table types. | all | No | No |
An access key in aws-access-key-id and aws-secret-access-key takes precedence over the default credential chain of environment variables, the service account's IAM role, and the instance profile.
Operations
Refer to Catalogs and schemas for more details.
aws-access-key-id and aws-secret-access-key are hidden when the catalog is loaded; engines get storage access through credential vending.
Schema
Capabilities
The Glue catalog supports creating, updating, and deleting databases in the AWS Glue Data Catalog.
Properties
A schema has no properties of its own beyond comment. Any property you set is stored on the Glue database.
Operations
See Catalogs and schemas.
Table
Capabilities
- The Glue catalog supports creating, updating, and deleting tables in the AWS Glue Data Catalog.
- All entries in the Glue
Table.parameters()pass through Gravitino intact, so downstream tools can correctly identify the table format. - Does not support column default value.
- Does not support NOT NULL constraints on columns.
- Does not support table indexes.
Partitioning
The Glue catalog supports partitioned tables. Create partitioned tables in the Glue catalog by specifying the partitioning attribute.
The supported partitioning strategies depend on the table format:
- Hive-format tables: Only
Identitypartitioning is supported, because the native Glue partition model is Hive-style key=value. - Iceberg-format tables: All Iceberg partition transforms are supported:
identity,year,month,day,hour,bucket, andtruncate.
The fieldName specified in the partitioning attribute must be the name of a column defined in the table.
Sort orders and distributions
The Glue catalog supports bucketed sorted tables. Create bucketed sorted tables by setting the distribution and sortOrders attributes.
Although Gravitino supports several distribution strategies, AWS Glue inherently only supports a single distribution strategy (clustered by column). Therefore, the Glue catalog only supports Hash distribution.
The fieldName specified in the distribution and sortOrders attribute must be the name of a column defined in the table.