Table: aws_glue_catalog_database - Query AWS Glue Databases using SQL
The AWS Glue Catalog Database is a managed service that serves as your integrated, centralized data catalog. It organizes, locates, moves, controls, and cleans data across various data stores. It also stores metadata about databases, tables, or other data catalog objects created by AWS Glue.
Table Usage Guide
The aws_glue_catalog_database
table in Steampipe provides you with information about databases within AWS Glue Catalog. This table allows you, as a DevOps engineer, data scientist, or database administrator, to query database-specific details, including the catalog ID, database name, description, location URI, and associated metadata. You can utilize this table to gather insights on databases, such as the creation time, last modified time, and the number of tables in each database. The schema outlines for you the various attributes of the AWS Glue Catalog Database, including the create time, compatibility, data location, parameters, and associated tags.
Examples
Basic info
Determine the areas in which AWS Glue has cataloged databases, including when they were created and their default permissions. This can be useful for understanding your data landscape and ensuring appropriate access controls are in place.
select name, catalog_id, create_time, description, location_uri, create_table_default_permissionsfrom aws_glue_catalog_database;
select name, catalog_id, create_time, description, location_uri, create_table_default_permissionsfrom aws_glue_catalog_database;
Count the number of databases per catalog
Determine the volume of databases associated with each catalog in your AWS Glue service. This can help you understand how your databases are distributed across different catalogs, aiding in efficient resource allocation and management.
select catalog_id, count(name) as database_countfrom aws_glue_catalog_databasegroup by catalog_id;
select catalog_id, count(name) as database_countfrom aws_glue_catalog_databasegroup by catalog_id;
Schema for aws_glue_catalog_database
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
catalog_id | text | The ID of the Data Catalog in which the database resides. | |
create_table_default_permissions | jsonb | Creates a set of default permissions on the table for principals. | |
create_time | timestamp with time zone | The time at which the metadata database was created in the catalog. | |
description | text | A description of the database. | |
federated_database | jsonb | A FederatedDatabase structure that references an entity outside the Glue Data Catalog. | |
location_uri | text | The location of the database (for example, an HDFS path). | |
name | text | = | The name of the database. For Hive compatibility, this is folded to lowercase when it is stored. |
parameters | jsonb | These key-value pairs define parameters and properties of the database. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
target_database | jsonb | A DatabaseIdentifier structure that describes a target database for resource linking. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_glue_catalog_database