Skip to main content

Module introspection

Module introspection 

Source
Expand description

Read-only catalog introspection queries.

Methods on IntrospectionClient query the mz_catalog and information_schema to inspect the live environment without modifying it. Provides batch existence checks for schemas, clusters, and objects, as well as dependency lookups used during deployment planning and sink repointing.

Structsยง

DependentSink
A sink that depends on an object in a schema being dropped.

Functionsยง

check_catalog_objects_exist ๐Ÿ”’
Check which objects from the given set exist in a specific catalog table.
check_clusters_exist ๐Ÿ”’
Check which clusters from a set of names exist.
check_connection_exists ๐Ÿ”’
Check if a connection exists in the specified database and schema.
check_connections_exist ๐Ÿ”’
Check which connections from the given set exist in the database.
check_objects_exist ๐Ÿ”’
Check which objects from a set exist in the production database.
check_schemas_exist ๐Ÿ”’
Check which schemas from a set of (database, schema) pairs exist.
check_secrets_exist ๐Ÿ”’
Check which secrets from the given set exist in the database.
check_sinks_exist ๐Ÿ”’
Check which sinks from the given set exist in the database.
check_sources_exist ๐Ÿ”’
Check which sources from the given set exist in the database.
check_tables_exist ๐Ÿ”’
Check which tables from the given set exist in the database.
cluster_exists ๐Ÿ”’
Check if a cluster exists.
drop_objects ๐Ÿ”’
Drop specific objects by their ObjectIds.
drop_schema_objects ๐Ÿ”’
Drop all objects in a schema.
drop_staging_clusters ๐Ÿ”’
Drop staging clusters by name.
drop_staging_schemas ๐Ÿ”’
Drop staging schemas by name.
find_sinks_depending_on_schemas ๐Ÿ”’
Find sinks that depend on objects in the specified schemas.
get_cluster ๐Ÿ”’
Get a cluster by name.
get_cluster_config ๐Ÿ”’
Get cluster configuration including replicas and grants.
get_cluster_grants ๐Ÿ”’
Get privilege grants on a cluster by name.
get_connection_create_sql ๐Ÿ”’
Get the CREATE CONNECTION SQL for an existing connection.
get_current_user ๐Ÿ”’
Get the current Materialize user/role.
get_database_object_grants ๐Ÿ”’
Get privilege grants on a database object (table, source, secret, connection).
get_default_privilege_grants_for_cluster ๐Ÿ”’
Get default privilege grants for a cluster by name.
get_default_privilege_grants_for_database_object ๐Ÿ”’
Get default privilege grants for a database object (table, source, secret, connection).
get_default_privilege_grants_for_named_object ๐Ÿ”’
Get default privilege grants for a named infrastructure object (cluster, network policy).
get_default_privilege_grants_for_network_policy ๐Ÿ”’
Get default privilege grants for a network policy by name.
get_named_object_grants ๐Ÿ”’
Get privilege grants on a named infrastructure object (cluster, network policy).
get_network_policy_grants ๐Ÿ”’
Get privilege grants on a network policy by name.
get_role_members ๐Ÿ”’
Get the members granted to a role.
get_role_parameters ๐Ÿ”’
Get session default parameter names for a role.
get_staging_clusters ๐Ÿ”’
Get staging cluster names for a specific deployment.
get_staging_schemas ๐Ÿ”’
Get staging schema names for a specific deployment.
list_clusters ๐Ÿ”’
List all clusters.
mz_type_to_drop_keyword ๐Ÿ”’
Map a Materialize object type string to its DROP keyword.
network_policy_exists ๐Ÿ”’
Check if a network policy exists.
object_exists ๐Ÿ”’
Check if an object (MV, table, source) exists in the specified schema.
role_exists ๐Ÿ”’
Check if a role exists.
schema_exists ๐Ÿ”’
Check if a schema exists in the specified database.