AWS Glue Data Catalog: Crawlers, Partitions, and the Hive Metastore
A data catalog is the metadata layer that tells query engines what data exists, what schema it has, and where it physically lives — and on AWS that layer is the AWS Glue Data Catalog, a managed, Apache Hive metastore-compatible registry of databases, tables, and partitions that Athena, Redshift Spectrum, EMR, and Glue jobs all read so you can query data at its source without copying it. DEA-C01 Task 2.2 tests the full cataloging workflow: pointing each engine at the catalog (or at a Hive metastore), running Glue crawlers to discover schemas and choosing how they react to schema changes, keeping partitions synchronized as new data lands in S3 (crawlers, MSCK REPAIR TABLE, ALTER TABLE ADD PARTITION, Glue jobs that update the catalog, partition projection, partition indexes), creating source and target connections so crawlers and jobs can reach JDBC databases inside VPCs, and distinguishing this technical catalog from a business data catalog like Amazon SageMaker Catalog, where assets carry business context and access flows through publish-and-subscribe governance. This lesson works through each skill with the configuration details and failure modes that decide which option is right.
On this page10 sections
- Why data catalogs exist: consuming data at the source
- The AWS Glue Data Catalog as your technical catalog
- Glue Data Catalog vs the Apache Hive metastore
- Pointing Redshift, Athena and EMR at a catalog
- Discovering schemas with AWS Glue crawlers
- Crawler run modes and schema change policy
- Keeping partitions synchronized with the catalog
- Partition projection vs partition indexes
- Creating source and target connections
- Business data catalogs: Amazon SageMaker Catalog
- Explain how a data catalog lets Athena, Redshift Spectrum, EMR, and Glue consume data at its source, and when Athena needs a federated connector instead
- Build and reference a technical data catalog with the AWS Glue Data Catalog or an Apache Hive metastore from Redshift, Athena, and EMR (including cross-account)
- Configure Glue crawlers: classifiers, include paths and table grouping, run modes (full, new sub-folders only, S3 events), and schema-change and delete behavior
- Synchronize S3 partitions with the catalog using crawlers, MSCK REPAIR TABLE, ALTER TABLE ADD PARTITION, and Glue jobs that update the catalog
- Choose between Athena partition projection and Glue partition indexes, and configure each correctly
- Create and secure Glue connections to JDBC sources and targets inside VPCs (Secrets Manager, KMS, security groups, S3 endpoint)
- Distinguish technical catalogs from business catalogs and describe Amazon SageMaker Catalog's role
Why data catalogs exist: consuming data at the source
A data catalog exists so that compute engines can query data where it already lives, because files in S3 are just bytes until something records their schema, format, and location. The catalog holds that metadata — table definitions, column names and types, serialization format, partition layout, and the S3 path or JDBC source behind each table — and every engine that trusts the catalog can immediately query the data at its source, with no copies and no per-engine schema definitions.
That is the pattern DEA-C01 calls "use data catalogs to consume data from the data's source." Register a dataset once, and Amazon Athena queries it serverlessly, Redshift Spectrum joins it against warehouse tables through an external schema, Amazon EMR reads it from Spark or Hive, and AWS Glue jobs load it as dynamic frames — all from the same table definition. Change the schema in one place and every consumer sees the change.
Without a catalog, each tool needs its own hand-maintained DDL, schemas drift apart, and analysts can't discover what data exists. With one, the catalog becomes the single source of truth for structure, the enforcement point for governance (AWS Lake Formation grants its fine-grained permissions on catalog databases, tables, and columns), and the discovery surface for the whole lake.
Keep the two catalog categories straight from the start: a technical catalog (Glue Data Catalog, Apache Hive metastore) stores machine-facing metadata that query engines require, while a business catalog (Amazon SageMaker Catalog) layers human-facing context — descriptions, glossaries, ownership, approval workflows — on top. The exam tests both and the boundary between them.
One boundary matters when the source is not S3. Athena reads Glue Data Catalog tables as files in Amazon S3, so a table that a crawler created from a DynamoDB table (useful to Glue ETL jobs, which read it through the DynamoDB connector) is not something Athena can scan. To query DynamoDB — or RDS, Redshift, CloudWatch Logs and other stores — in place from Athena, deploy an Athena Federated Query connector (a Lambda function) and register it as an Athena data source; one SQL statement can then join awsdatacatalog tables over S3 with tables in the federated catalog, reading the live source at query time.
The AWS Glue Data Catalog as your technical catalog
The AWS Glue Data Catalog is a fully managed, serverless technical catalog: one Data Catalog per AWS account per Region (which can now contain nested catalogs, such as Amazon S3 Tables or Redshift-managed catalogs), organized as databases (namespaces) containing tables, where each table records the schema, input/output formats, SerDe (serializer/deserializer), physical location, and partitions of a dataset.
A table in the catalog does not hold data — it points at data. For S3-backed tables the location is a prefix such as an S3 path per partition; for JDBC-backed tables it references a connection and a source table. Tables get into the catalog three ways: crawlers infer them automatically (next section), DDL creates them explicitly (CREATE EXTERNAL TABLE in Athena or Spark SQL), and the Glue APIs or infrastructure-as-code define them programmatically. Each table keeps a version history as its schema evolves, so you can inspect and roll back schema changes.
Referencing the catalog is what makes it useful. Athena resolves every query against it. Redshift Spectrum external schemas map to catalog databases (details in the next-but-one section). Glue ETL jobs read tables as dynamic frames by database and table name instead of hardcoding paths and schemas. EMR clusters can be configured to use the Glue Data Catalog as their metastore for Spark and Hive. The Data Catalog also serves as the metastore for Apache Iceberg tables on AWS, tracking each table's current metadata pointer.
Access control is two-layered: IAM policies gate the Glue APIs themselves, and AWS Lake Formation adds database-, table-, column-, row-, and cell-level grants enforced by Athena, Spectrum, Glue, and EMR. Cross-account catalog sharing (via Lake Formation grants or catalog resource policies) lets a producer account expose tables to consumer accounts without duplicating data or metadata.
Glue Data Catalog vs the Apache Hive metastore
The Glue Data Catalog is Apache Hive metastore-compatible: it implements the metastore interface that Hive, Spark, Presto, and Trino were built against, which is why those engines can treat it as a drop-in metastore. Understanding the relationship is an exam skill because migration scenarios hinge on it.
A traditional Apache Hive metastore is self-managed: a metastore service backed by a relational database (often MySQL or PostgreSQL) that you provision, patch, back up, and scale yourself — commonly running alongside an on-premises Hadoop cluster or on an EMR cluster's master node backed by RDS. The Glue Data Catalog delivers the same table metadata as a serverless managed service: no database to run, native integration with Athena, Spectrum, Lake Formation, and Glue ETL, and IAM-based security.
Amazon EMR is where the choice is explicit: a cluster can use its default local metastore (lost when the cluster terminates), an external Hive metastore on RDS (persistent, self-managed), or the Glue Data Catalog (persistent, managed, shared with every other AWS analytics engine). For persistent metadata with the least operational overhead — and any scenario where Athena or Redshift Spectrum must see the same tables as EMR — the Glue Data Catalog is the exam answer. The external RDS metastore remains valid when a scenario demands Hive-metastore-specific behavior or an unmigrated legacy dependency.
Using the Glue Data Catalog as the EMR metastore has documented limits. Hive transactions (ACID tables) are not supported, and Hive authorization (SQL-standard GRANT/REVOKE) is not supported — access is controlled with IAM policies, Glue resource policies, and Lake Formation instead. A workload that depends on either is a reason to keep a self-managed metastore or to move to a table format such as Apache Iceberg for transactional writes.
For migrations, the standard pattern moves Hive metastore contents into the Glue Data Catalog (AWS provides migration tooling and scripts for this), after which on-premises engines' workloads pointed at AWS use one shared, serverless catalog. When a question contrasts "self-managed metastore database" with "fully managed, serverless catalog integrated with Athena," it is drawing exactly this line.
Pointing Redshift, Athena and EMR at a catalog
Each engine is pointed at a technical catalog with its own mechanism, and most configuration questions come down to knowing which setting lives where.
Amazon Redshift (Spectrum)
Redshift references lake tables through an external schema, so the tables are not redefined or loaded. CREATE EXTERNAL SCHEMA lake_ext FROM DATA CATALOG DATABASE 'lake' IAM_ROLE '...' maps a Glue database; CREATE EXTERNAL SCHEMA ... FROM HIVE METASTORE DATABASE '...' URI '...' PORT 9083 IAM_ROLE '...' maps a database in an Apache Hive metastore (for example on an EMR primary node) using the metastore's URI and port. With FROM DATA CATALOG, the IAM role named in the statement does two separate jobs: it reads metadata from the Glue Data Catalog (Glue permissions) and reads the data files from S3 (with FROM HIVE METASTORE the metadata comes from the metastore instead, but the role still needs the S3 reads) (s3:GetObject/s3:ListBucket, plus kms:Decrypt for SSE-KMS objects). If only the catalog half is granted, listing external tables and their columns works but every scan fails with an S3 access-denied error.
Redshift data sharing can include data lake tables, but only after the producer has defined them through an external schema; a datashare shares what a warehouse already references. It is therefore not a way to bring a Glue database into Redshift in the first place — the external schema is.
Amazon Athena
Athena uses the account's Glue Data Catalog (AwsDataCatalog) by default. When an existing Apache Hive metastore must stay the single source of table definitions, Athena can query through it instead: you register an external Hive metastore data source, which Athena reaches through a Lambda function running in the metastore's VPC. Queries then name that catalog, and no table is redefined in Glue.
Amazon EMR
EMR applications read their metastore client settings from configuration classifications, and Hive and Spark are configured separately:
| Classification | What it configures | Role in using the Glue Data Catalog |
|---|---|---|
hive-site | Hive | Set hive.metastore.client.factory.class to the Glue client factory (com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory) so Hive uses the catalog |
spark-hive-site | Spark SQL's Hive support | Set the same client factory property so Spark uses the catalog; without it Spark falls back to a local metastore and sees only an empty default database even though Hive works |
spark-env | Environment variables for Spark processes | Not where Spark reads metastore client properties |
core-site | Hadoop core settings (file systems, I/O) | Not where the metastore client is configured |
To use a Glue Data Catalog in another account, two things are needed. In the EMR configuration, set hive.metastore.glue.catalogid to the owning account ID (in hive-site and spark-hive-site). In the catalog-owning account, add a Glue Data Catalog resource policy that grants the EMR roles from the consumer accounts access to the catalog, databases and tables; the consumer accounts also need IAM permissions for those Glue actions on the remote catalog ARNs. (If Lake Formation governs the catalog, its cross-account grants apply as well.) A resource policy placed in the consumer account grants nothing on a catalog it does not own.
Discovering schemas with AWS Glue crawlers
A Glue crawler discovers schemas so you don't hand-author them: point it at a data store, and it samples the data, infers format and schema through classifiers, groups similar objects into tables, detects the partition layout from the S3 folder structure, and writes or updates table definitions in the Data Catalog.
Classifiers. Built-in classifiers recognize JSON, CSV (and other delimited text), Parquet, Avro, ORC, XML, common log formats and more; the first classifier that recognizes the data with enough certainty wins. When nothing recognizes a proprietary format, the table comes out classified as UNKNOWN — the fix is a custom classifier (grok patterns for line-oriented text, XML row tags, JSON paths, or a custom CSV classifier) attached to the crawler, which reads the data where it is.
The built-in CSV classifier decides whether the first row is a header with a type heuristic: it treats the first row as a header only when it differs in type from the rows below (for example, strings over numeric columns). If every column holds text, the header looks like data, so the table gets columns col0, col1, ... and the header line is returned as a row. A custom CSV classifier fixes this through its column-headings setting: Has headings declares that the first row is a header, while Detect headings just repeats the same heuristic. The custom classifier also sets the delimiter and quote symbol.
Targets and permissions. Crawlers read S3, JDBC sources (through a Glue connection), DynamoDB tables, and other stores — crawling a DynamoDB table is how a Glue ETL job gets a catalog definition for an undocumented attribute set. Each crawler runs with an IAM role that must read the target data and write to the catalog. The AWSGlueServiceRole managed policy covers Glue itself, not your data: add S3 read on the paths, and for objects encrypted with SSE-KMS under a customer managed key add kms:Decrypt on that key — without it the crawler runs, logs access-denied errors, and creates no tables.
Include paths and table grouping. A crawler compares the schemas it finds under each include path. Folders under one include path whose schemas are similar are grouped as partitions of one table named after the path, with a partition column (such as partition_0) holding the folder names. That explains both classic surprises. Two different datasets with near-identical columns under one include path (for example s3://warehouse-raw/invoices/ and s3://warehouse-raw/credit-notes/ under s3://warehouse-raw/) collapse into one table — give each dataset root its own include path to get separate tables. Conversely, one dataset whose files differ slightly (for example, newer files carry extra optional columns) can splinter into hundreds of tables — turn on Create a single schema for each S3 path (the CombineCompatibleSchemas grouping policy) so compatible schemas merge into one partitioned table, or use the table-level setting to state at which folder depth tables start.
Crawler run modes and schema change policy
A crawler's run mode decides what it looks at on each run, and its schema change policy decides what it is allowed to change in the catalog. Both are common sources of "the crawler ran but the catalog is wrong".
Run modes
| Mode | What each run examines | What it misses |
|---|---|---|
| Crawl all sub-folders (default) | Lists and samples the whole target every run | Nothing, but listing a huge bucket can take hours |
Crawl new sub-folders only (incremental, CRAWL_NEW_FOLDERS_ONLY) | After a first full crawl, adds only folders that did not exist before | Changes to objects inside existing folders; schema changes (it forces update and delete behavior to LOG); it still lists the folder structure |
S3 event mode (CRAWL_EVENT_MODE) | Reads S3 event notifications from an SQS queue and crawls only the objects or folders that changed | Changes that never produced an event; needs the bucket notifications and queue set up |
Runs can be started on demand, on a cron schedule, or by a Glue workflow trigger. For a very large bucket where few objects change between runs, event mode is the design that avoids re-listing everything. Incremental mode suits append-only data with a stable schema; if a column is added later, it never reaches the catalog — run one full crawl with update behavior set to update the table (then switch back), or add the column yourself with ALTER TABLE ADD COLUMNS.
Schema change policy
| Setting | Option | Effect |
|---|---|---|
| Update behavior | Update the table definition (UPDATE_IN_DATABASE, default) | Re-inferred schema overwrites the table, including hand-tuned types |
| Update behavior | Add new columns only (MergeNewColumns) | New columns are added; existing columns and types are kept |
| Update behavior | Ignore the change and don't update the table (LOG) | Schema changes are only logged; new partitions are still added |
| Partitions | Update all new and existing partitions with metadata from the table (InheritFromTable) | Partitions take the table's schema, so queries spanning old and new partitions stop failing on partition schema mismatches |
| Delete behavior | Delete tables and partitions from the Data Catalog (DELETE_FROM_DATABASE) | Catalog entries for removed data disappear on the next run |
| Delete behavior | Mark the table as deprecated (DEPRECATE_IN_DATABASE) | Entries stay but are flagged deprecated, so owners can be warned and clean up |
| Delete behavior | Ignore the change (LOG) | Removal is only logged; entries stay unflagged |
To protect a curated table while the crawler keeps registering partitions, set update behavior to LOG (usually with partitions inheriting from the table), or use Add new columns only when new columns should still flow in but existing types must not change.
Keeping partitions synchronized with the catalog
Partitions must be registered in the catalog before queries can see them: Athena, Redshift Spectrum and EMR prune by partition using catalog metadata, so a new dt=2026-07-29 folder in S3 is invisible until something adds the matching partition entry. There are four ways to register partitions, plus projection (next section), which avoids registration in Athena.
Re-run a crawler — the general answer. A scheduled or event-driven crawler adds new partition folders and, with the right update behavior, new columns too. Cost: crawler runtime and lag between the write and the next run.
MSCK REPAIR TABLE in Athena scans the table's S3 path and adds any Hive-style partitions (key=value folder names) missing from the catalog. Simple, but it lists the entire prefix — slow on tables with many partitions — and it only recognizes Hive-style layouts.
ALTER TABLE ADD PARTITION registers specific partitions explicitly — the precise, cheap move when your pipeline knows exactly which partition it just wrote. Without a LOCATION clause, Athena assumes the Hive-style default path (table location plus key=value/ folders). For non-Hive layouts such as s3://telemetry-logs/2026/03/14/, give each partition its location: ALTER TABLE telemetry ADD PARTITION (year='2026', month='03', day='14') LOCATION 's3://telemetry-logs/2026/03/14/'.
Let the Glue job update the catalog as it writes. A Glue ETL job writing to S3 can register partitions itself, so they are queryable in every engine the moment the run ends, with no crawler or extra step:
- Set
enableUpdateCatalogto true and passpartitionKeys(matching the table's partition keys, in the same order) — throughadditional_optionsonwrite_dynamic_frame.from_catalog, or as arguments togetSink()followed bysetCatalogInfo()andsetFormat(). WithoutenableUpdateCatalog, the job never touches the catalog. updateBehaviordecides what happens to the schema:UPDATE_IN_DATABASE(the default) adds partitions and overwrites the table schema with the schema the job writes — which can add, drop or retype columns;LOGkeeps the catalog schema and adds new partitions only when the written columns match it or are a subset of it.- It works for S3 targets in JSON, CSV, Avro and Parquet (Parquet through the Glue Parquet writer), and schema updates need a partitioned table.
Because these four methods write real partition entries to the Glue Data Catalog, they serve Athena, Redshift Spectrum and EMR alike — unlike projection, which only Athena understands.
Scenario
A Glue job writes hourly Parquet files to s3://lake/events/dt=YYYY-MM-DD/hr=HH/, and analysts complain new hours don't appear in Athena or Spectrum until the nightly crawler runs. Lowest-latency fixes: turn on enableUpdateCatalog with partitionKeys in the job, or have the writer issue ALTER TABLE ADD PARTITION after each write. If only Athena queries the table, partition projection over the date and hour ranges is also an option — any of these beats scheduling the crawler hourly.
Partition projection vs partition indexes
Partition projection and partition indexes both attack slow query planning on heavily partitioned tables, but they work differently: projection makes Athena compute partitions instead of reading them from the catalog, while an index makes the catalog's partition lookup faster.
Partition projection (Athena only)
With 'projection.enabled'='true' and per-column rules in the table properties, Athena calculates partition values and locations at query time. Nothing has to be registered, and planning no longer fetches large partition lists. The rules:
- Types:
date(withformat,rangesuch as2022-01-01,NOW, interval),integer(withrange, optionalinterval, anddigitsfor zero padding —digits= 2 produces 01, 02 …),enum(a listed set of values), andinjectedfor values that cannot be listed (such as device IDs). An injected column is never enumerated, so every query must supply its value(s) in theWHEREclause; a query that spans all values without naming them fails. - Range bounds: values outside the declared range are never generated, so data outside it returns no rows.
- Location: for Hive-style folders Athena builds paths as
key=valueunder the table location. For any other layout, setstorage.location.templatewith a${column}placeholder per partition key, such ass3://telemetry-logs/${year}/${month}/${day}/; without it Athena looks for Hive-style paths and finds nothing. - Catalog partitions are ignored: once projection is enabled, Athena does not read the partitions registered in the catalog for that table — so a projection range that starts later than the oldest data hides that older data, even though its partitions are still registered.
- Athena only: Redshift Spectrum, EMR and Glue jobs do not apply projection rules. If they read the same table, partitions must still be registered in the catalog.
Glue partition indexes
A partition index is built on a list of the table's partition keys, so the Data Catalog fetches only matching partitions instead of loading every partition and filtering. They suit tables with very many partitions whose values are not predictable enough for projection, and they work for every engine. The rules:
- An index is used only when the query's filter includes the index's first key (an index on
(region, product, dt)does not help a filter onproductanddtalone). Supported operators are equality and ranges joined byAND. - A table can have up to three partition indexes, so add another index whose leading key matches a different query pattern; key names, types and order of indexed keys cannot be changed after creation.
- Crawlers create a partition index for S3 and Delta Lake targets by default — but they do not set
partition_filtering.enabledon the table, so Athena will not use that index until you add the property (next rule). - Athena uses partition indexes only after the table property
partition_filtering.enabledis set totrue; Redshift Spectrum, EMR and Glue Spark DataFrames use active indexes without extra steps.
| Partition projection | Partition indexes | |
|---|---|---|
| Partition registration | Not needed (in Athena) | Still needed |
| Engines | Athena only | Athena (with partition filtering), Spectrum, EMR, Glue |
| Best fit | Predictable values: dates, hours, integer ranges, small enums | Millions of partitions with unpredictable values (for example new regions or event types) |
Creating source and target connections
A Glue connection is a catalog object that stores how to reach a data store — connection type, endpoint, credentials, and network placement — so crawlers and ETL jobs can use sources and targets that aren't public S3 paths.
JDBC connections cover relational sources and targets: Amazon RDS, Aurora, Amazon Redshift, and on-premises or self-managed databases reachable over JDBC. The connection stores the JDBC URL and credentials — best practice is referencing a secret in AWS Secrets Manager rather than storing a username and password in the connection, so no password lives in a Glue resource and rotation needs no Glue change. Purpose-built connection types also exist for DynamoDB, MongoDB, Kafka/MSK, and a growing set of SaaS sources.
Permissions for the secret. The crawler or job role must read the secret value: secretsmanager:GetSecretValue on the secret, and, when the secret is encrypted with a customer managed KMS key, kms:Decrypt on that key (the AWS managed key needs no key-policy change). secretsmanager:DescribeSecret only returns metadata, not the value, and kms:GenerateDataKey is used when a new secret value is written, not read. Missing read permissions make runs fail with access-denied errors before any network connection is attempted.
Networking is the part candidates get wrong. To reach a database inside a VPC, the connection specifies a VPC, subnet, and security group; when a job or crawler runs, Glue creates elastic network interfaces (ENIs) in that subnet with that security group, and all of its traffic originates from them. Keep three rules apart:
- Self-referencing rule on the connection's security group — a Glue requirement: the group must have an inbound rule allowing all TCP traffic from itself so Glue's components can talk to each other. Glue checks for it when the job or crawler starts and fails up front if it is missing.
- Database security group inbound from the connection's group — the database's security group must allow the database port from the connection's security group (or its subnet). When this is missing, the run starts and then times out opening the connection to the database port — the usual cause of JDBC timeouts.
- Routes from the connection's subnet — because the ENIs live in the connection's private subnet, everything else the job touches must be reachable from there. For Amazon S3 that means an S3 gateway VPC endpoint on the subnet's route table (or a NAT gateway where internet egress is allowed). A bucket policy with
aws:SourceVpcoraws:SourceVpcegrants permission but provides no route, so it cannot fix a missing endpoint. DNS resolution must also be enabled in the VPC for hostname-based JDBC URLs.
Connections are reused across the system: a crawler uses one to catalog a source database's schema, and ETL jobs use the same connection as a source or a target — for example writing transformed output back to Redshift or Aurora. The console's test-connection action validates reachability and credentials before you debug a failing job blind.
Business data catalogs: Amazon SageMaker Catalog
A business data catalog serves people rather than query engines: it makes data assets discoverable, understandable, and governed for the whole organization. On AWS that is Amazon SageMaker Catalog, part of the next generation of Amazon SageMaker (built on Amazon DataZone technology) and surfaced through SageMaker Unified Studio.
In SageMaker Catalog, technical assets — Glue Data Catalog tables, Redshift tables, and other data and ML assets — are enriched with business metadata: plain-language descriptions, business glossary terms, ownership, and quality context. To avoid writing that metadata by hand for hundreds of assets, SageMaker Catalog can generate metadata recommendations with generative AI: draft business names and descriptions for assets and their columns, which the owner reviews, edits and accepts before the asset is published. Work is organized into domains and projects; producers publish assets to the catalog, and consumers search for them and subscribe, triggering an approval workflow. When the owner approves, access is granted automatically through the underlying permission machinery (Lake Formation grants for lake tables, Redshift grants for warehouse tables) — governed self-service instead of tickets and manual bucket policies.
| Dimension | Technical catalog (Glue Data Catalog, Hive metastore) | Business catalog (SageMaker Catalog) |
|---|---|---|
| Primary audience | Query engines and ETL jobs | Analysts, data consumers, governance teams |
| Contents | Schemas, formats, SerDes, locations, partitions | Descriptions, glossaries, ownership, curated asset listings |
| Core question answered | How do I read this data? | What data exists, what does it mean, and how do I get access? |
| Access model | IAM and Lake Formation permissions | Publish and subscribe with approval workflows |
| Populated by | Crawlers, DDL, APIs | Publishing assets and curating metadata on top of technical sources |
They are complements, not rivals: the business catalog references assets whose schemas live in the technical catalog. Exam cue: schema-for-queries requirements point to the Glue Data Catalog; discovery, business context, and governed subscription workflows point to SageMaker Catalog.
Tip. Expect questions on which mechanism keeps partitions in sync — crawler vs MSCK REPAIR TABLE vs ALTER TABLE ADD PARTITION vs a Glue job updating the catalog vs partition projection — framed around latency, layout (Hive-style or not), and which engines read the table. Projection and partition-index questions turn on their rules: Athena-only, storage.location.template, ranges, first index key, partition_filtering.enabled. Crawler questions test classifiers (including CSV headers), include paths and table grouping, run modes, and schema-change and delete behavior. Metastore questions contrast Glue with a self-managed Hive metastore and test how Redshift, Athena and EMR (including cross-account) are pointed at a catalog. Connection questions test Secrets Manager and KMS permissions, security-group rules, and the S3 endpoint. Business-catalog questions ask what Amazon SageMaker Catalog adds beyond the technical catalog.
- The Glue Data Catalog is the single metadata source Athena, Redshift Spectrum, EMR, and Glue jobs all share — register a table once, query it at its source from every engine; Athena reaches DynamoDB and other non-S3 stores through Federated Query connectors.
- Redshift references lake tables through an external schema (FROM DATA CATALOG or FROM HIVE METASTORE), and its IAM role needs both catalog and S3 read access; datashares can only include lake tables already defined that way.
- On EMR, hive-site configures Hive and spark-hive-site configures Spark to use the Glue Data Catalog; a cross-account catalog needs hive.metastore.glue.catalogid plus a resource policy in the owning account. Hive transactions and Hive authorization are not supported with Glue.
- Crawlers infer schemas with classifiers (custom classifiers for unknown formats; a custom CSV classifier with Has headings for all-text headers) and group similar schemas under one include path into one partitioned table.
- Crawl new sub-folders only skips schema changes and changed objects; S3 event mode crawls only what changed. Update behavior LOG or Add new columns only protects curated schemas while partitions keep being added; delete behavior can delete, deprecate or just log.
- New S3 partitions are invisible until cataloged: crawlers, MSCK REPAIR TABLE (Hive-style only), ALTER TABLE ADD PARTITION (with LOCATION for non-Hive layouts), or a Glue job with enableUpdateCatalog and partitionKeys.
- Partition projection is Athena-only, ignores catalog partitions, and needs storage.location.template for non-Hive paths; partition indexes need the first key in the filter, allow three per table, and need partition_filtering.enabled in Athena.
- Glue connections store endpoint, credentials (Secrets Manager — the role needs GetSecretValue and kms:Decrypt), and VPC placement; keep the self-referencing rule, the database's inbound rule, and an S3 gateway endpoint straight.
- A technical catalog answers how engines read data; a business catalog (Amazon SageMaker Catalog) answers what data means, drafts AI metadata for owners to review, and grants access through publish-and-subscribe approval workflows.
Frequently asked questions
What is the difference between the AWS Glue Data Catalog and an Apache Hive metastore?
Both store the same kind of technical metadata — databases, tables, schemas, partitions, locations — and the Glue Data Catalog is Hive metastore-compatible, so engines like Spark, Hive, and Trino can use it as a drop-in metastore. The difference is operations: a Hive metastore is a service you run yourself backed by a relational database you must provision, patch, and back up, while the Glue Data Catalog is serverless and fully managed, with native integration into Athena, Redshift Spectrum, Lake Formation, and Glue ETL.
Why don't new S3 partitions show up in Athena queries?
Because Athena prunes and locates data using partition metadata in the Glue Data Catalog, and writing a new folder to S3 does not update the catalog. You must register the partition: re-run a crawler, run MSCK REPAIR TABLE for Hive-style key=value layouts, issue ALTER TABLE ADD PARTITION (with a LOCATION for non-Hive paths) from the pipeline that wrote the data, have the Glue job register partitions itself with enableUpdateCatalog and partitionKeys, or configure partition projection so Athena computes partition locations from declared patterns.
When should I use partition projection instead of a crawler?
Use partition projection when partitions follow a predictable pattern — dates, hours, integer ranges, or a short enum — and only Athena queries the table. Projection removes both the registration lag and the catalog partition lookups, because Athena derives partition locations at query time from table properties. Redshift Spectrum and EMR ignore projection, so tables they read still need registered partitions; keep crawlers (or catalog updates from the writing job) when values are unpredictable or other engines read the table.
Why did my Glue crawler create hundreds of tables instead of one partitioned table?
A crawler compares the schemas under each include path and groups similar ones into one table. If files under sibling folders differ slightly — for example newer files add optional columns — each folder can become its own table. Turn on the crawler option to create a single schema for each S3 path so compatible schemas merge into one partitioned table, or set the table level explicitly. Also point the include path at the dataset's top-level folder rather than too deep, so the folders below it are read as partitions. The opposite problem — two datasets merged into one table — is fixed by giving each dataset root its own include path.
How does a Glue job or crawler connect to a database inside a VPC?
Through a Glue connection that records the JDBC URL, credentials (ideally a Secrets Manager secret the role can read with GetSecretValue and kms:Decrypt), and a VPC, subnet, and security group. At run time Glue creates elastic network interfaces in that subnet, so the connection's security group needs a self-referencing inbound rule, the database's security group must allow the database port from the connection's group, and the subnet needs an S3 gateway endpoint or NAT route if the job also reads or writes S3.
What does Amazon SageMaker Catalog add on top of the Glue Data Catalog?
Business context and governed access. The Glue Data Catalog stores the technical metadata query engines need; SageMaker Catalog (built on Amazon DataZone technology) organizes those assets into domains and projects, enriches them with descriptions, glossary terms, and ownership — with generative-AI recommendations that draft business names and descriptions for owners to review — and makes them searchable. Consumers subscribe to an asset, an owner approves, and access is granted automatically through the underlying permissions.
How do I make Spark on Amazon EMR use the AWS Glue Data Catalog?
Set the Glue client factory (hive.metastore.client.factory.class = com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory) in the spark-hive-site configuration classification; hive-site configures Hive only, so Spark falls back to a local metastore without it. For a catalog in another account, also set hive.metastore.glue.catalogid to that account ID and have the owning account add a Glue resource policy granting the EMR roles access.
Why is my Athena partition index not making queries faster?
Check two things. Athena uses Glue partition indexes only after the table property partition_filtering.enabled is set to true. And an index is used only when the query filters on the index's first key, so a query that skips the leading key cannot use that index. A table can have up to three indexes, each serving the query patterns that filter on its first key. Also note that crawler-created tables get an index automatically but not the partition_filtering.enabled property, so Athena ignores that index until you add it.
Source
This lesson covers the "Data Store Management" domain of the official DEA-C01 exam guide. Vendors revise their guides — check the source for the current version.
- AWS Certified Data Engineer – Associate (DEA-C01) exam guide — Amazon Web Services
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.