Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026.
We will start enforcing it in phases. For more information on the details of Python end of life
and migration options, see the
blog post
Metadata Discovery
With Metadata Discovery, Amazon Redshift publishes metadata about the databases, schemas, tables, and views (regular, late-binding, and materialized) in your provisioned clusters and serverless namespaces to the AWS Glue Data Catalog, after you turn on auto-discovery there. Each object becomes an asset in the AWS Glue Data Catalog. You, your applications, and AI agents can then search and browse the metadata of every provisioned cluster and serverless namespace in your AWS account and AWS Region in one place, without connecting to each one. For more information about assets, see Discovering assets in AWS Glue Data Catalog in the AWS Glue Developer Guide.
This supports the following use cases:
-
Find tables and columns across clusters and namespaces – Search for a table or a column by name across all of your provisioned clusters and serverless namespaces.
-
Give applications and AI agents a map of your data – An application or an AI agent can search the AWS Glue Data Catalog for the right table, read its columns, and then query the table in Amazon Redshift. For more information, see Querying discovered Amazon Redshift objects from applications and AI agents.
-
Keep metadata current automatically – Amazon Redshift keeps the AWS Glue Data Catalog current as you create, change, and drop objects, with no crawlers or export jobs to maintain.
Metadata Discovery publishes metadata only, not the data in your tables. Amazon Redshift remains the source of truth. To change an asset, change the object in Amazon Redshift.
Metadata Discovery is available in the AWS Regions where auto-discovery is available in the AWS Glue Data Catalog. For the list of Regions, see Supported Regions for AWS Glue Data Catalog in the AWS Glue Developer Guide.
Topics
How it works
Metadata Discovery works as follows:
-
You turn on auto-discovery for your AWS account in an AWS Region. You do this in the AWS Glue Data Catalog. For the steps, see Discovering assets in AWS Glue Data Catalog in the AWS Glue Developer Guide.
-
Amazon Redshift publishes the objects that already exist in each provisioned cluster and serverless namespace in that account and Region. From then on, when a statement that creates, changes, or drops an object commits, Amazon Redshift publishes the changed object.
-
You search, browse, and read the assets in the AWS Glue Data Catalog. For more information, see Semantic search for AWS Glue Data Catalog in the AWS Glue Developer Guide.
Amazon Redshift publishes asynchronously, after your statement commits, so the AWS Glue Data Catalog is eventually consistent with your provisioned cluster or serverless namespace. A change typically appears in the AWS Glue Data Catalog within a few minutes of the commit, but the time isn't guaranteed.
To query the published metadata with SQL, you can export the metadata in the AWS Glue Data Catalog to system tables in Amazon S3 Tables. For more information, see Export metadata to S3 Tables in the AWS Glue Developer Guide.
Objects and metadata that Amazon Redshift publishes
The following table shows the objects that Amazon Redshift publishes and the asset type of each. For the definition of each asset type and its fields, see Amazon Redshift asset types and fields in the AWS Glue Data Catalog.
| Amazon Redshift object | Asset type | Notes |
|---|---|---|
| Provisioned cluster or serverless namespace | amazon.redshift::Namespace |
One for each provisioned cluster or serverless namespace. It contains the assets of its databases. |
| Database | amazon.redshift::Database |
The default database and each database that you create. |
| Schema | amazon.redshift::Schema |
The public schema and each schema that you create. |
| Table, view, late-binding view, or materialized view | amazon.redshift::Relation |
One asset type for all four. The asset includes the columns. |
Objects and metadata that Amazon Redshift doesn't publish
Amazon Redshift doesn't publish the following metadata:
-
The data in your tables, or the results of queries.
-
The SQL text of views and materialized views.
-
Comments on objects and columns.
-
Statistics, such as row counts and table sizes.
-
Privileges, row-level security policies, and dynamic data masking policies.
-
Column default values, constraints, and compression encodings.
Amazon Redshift doesn't publish the following objects:
-
Temporary tables.
-
System tables and system views, and other objects in system schemas such as
pg_catalogandinformation_schema. -
External schemas and external tables.
-
Databases that you create from a datashare or from the AWS Glue Data Catalog, and the objects in them. For a datashare, the provisioned cluster or serverless namespace that shares the objects publishes them.
-
Stored procedures, user-defined functions, and machine learning models.
-
Datashares, users, and roles.
Turning Metadata Discovery on and off
You turn Metadata Discovery on and off in the AWS Glue Data Catalog. The setting applies to your AWS account in one AWS Region, and it covers every provisioned cluster and serverless namespace in that account and Region. For the steps and the permissions that you need, see Discovering assets in AWS Glue Data Catalog in the AWS Glue Developer Guide.
Publishing requires patch 207 or later. For more information, see Amazon Redshift patch 207.
After you turn on Metadata Discovery, Amazon Redshift publishes the existing objects of each provisioned cluster and serverless namespace, and then publishes changes as they commit. The time to publish the existing objects depends on the number of databases and objects.
After you turn off Metadata Discovery, your Amazon Redshift assets are no longer available in the AWS Glue Data Catalog. If you turn it on again, the assets can take time to appear again and to reflect the current state of your objects.
Access to published metadata
Amazon Redshift publishes the metadata of a provisioned cluster or serverless namespace to the AWS Glue Data Catalog in the account that owns the cluster or namespace, in the same AWS Region.
You govern access to the published metadata with the permissions that you set in AWS Glue.
A principal who can read assets in your account can see the published metadata of every provisioned cluster and serverless namespace in that account and Region. This includes objects on which the principal might have no privileges in Amazon Redshift. Before you turn on Metadata Discovery, review who can read assets in the AWS Glue Data Catalog. For more information, see Discovering assets in AWS Glue Data Catalog in the AWS Glue Developer Guide.
Publishing and lifecycle behavior
Each asset has an identifier that doesn't depend on the name of the object. When you rename an object, the same asset gets the new name. When you drop an object and create another with the same name, the new object gets a new asset.
Changes to objects
Amazon Redshift publishes a change after the transaction commits. A transaction that rolls back publishes nothing. The following table shows what happens in the AWS Glue Data Catalog when you change an object, or delete a provisioned cluster or serverless namespace.
| Change | What happens in the AWS Glue Data Catalog |
|---|---|
| You create a database, schema, table, view, or materialized view. | Amazon Redshift publishes a new asset. |
| You add, drop, or rename a column, or change its data type. | Amazon Redshift updates the columns of the asset. |
| You change the distribution style or the sort key of a table. | Amazon Redshift updates the asset. |
You replace a view with CREATE OR REPLACE
VIEW. |
Amazon Redshift updates the asset. |
| You rename a table or a view. | The same asset gets the new name. |
| You rename a schema or a database. | The same asset gets the new name. The assets of the objects that it contains show the new name shortly afterward. |
| You drop a table, view, or materialized view. | Amazon Redshift removes the asset. |
| You drop a schema or a database. | Amazon Redshift removes the asset and the assets of everything that it contained. |
| You delete a provisioned cluster or a serverless namespace. | Amazon Redshift removes all of its assets. |
You load or change data, grant or revoke privileges, add a
comment, or run ANALYZE or VACUUM. |
Nothing. These statements don't change published metadata. |
Late-binding views and materialized views
A late-binding view isn't bound to its underlying objects. To publish the columns of a late-binding view, Amazon Redshift checks the underlying objects when you create or replace the view. The following applies to late-binding views:
-
Views without columns – If Amazon Redshift can't check the underlying objects, it publishes the late-binding view without columns. This happens when the late-binding view references an external table, an object in another database or in a datashare, or an object that doesn't exist.
-
Columns that are out of date – Amazon Redshift doesn't update the columns of a late-binding view's asset when an underlying object changes. To update them, run
CREATE OR REPLACE VIEWfor the late-binding view.
Amazon Redshift publishes a materialized view with its own columns. This includes materialized views for streaming ingestion. Refreshing a materialized view doesn't change its asset.
Considerations and limitations
The following considerations and limitations apply to Metadata Discovery:
-
Only the primary compute of a provisioned cluster or serverless namespace publishes. Concurrency scaling clusters don't publish. In a Multi-AZ deployment, only the primary publishes.
-
Amazon Redshift publishes only while a provisioned cluster or the workgroup of a serverless namespace is running. If you turn Metadata Discovery on or off while a cluster is paused or a workgroup is idle, the change takes effect for that cluster or namespace when it runs again.
-
The setting covers every provisioned cluster and serverless namespace in the account and Region. You can't turn on Metadata Discovery for one cluster, namespace, database, or schema, and you can't exclude one.
-
With data sharing, the provisioned cluster or serverless namespace that shares objects publishes them. One that consumes a datashare doesn't publish the shared objects.
-
The AWS Glue Data Catalog is eventually consistent with a provisioned cluster or serverless namespace. While Amazon Redshift publishes the existing objects for the first time, a search can return incomplete results.
-
The columns of a late-binding view in the AWS Glue Data Catalog can be out of date. For more information, see Late-binding views and materialized views.
-
An asset carries the name of the owner of a table or a view. If you rename the user, the asset shows the earlier name until the object next changes.
-
Amazon Redshift publishes the metadata of an object whether or not metadata security is on. For more information, see Metadata security in the Amazon Redshift Database Developer Guide.