steampipe plugin install aws

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_permissions
from
aws_glue_catalog_database;
select
name,
catalog_id,
create_time,
description,
location_uri,
create_table_default_permissions
from
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_count
from
aws_glue_catalog_database
group by
catalog_id;
select
catalog_id,
count(name) as database_count
from
aws_glue_catalog_database
group by
catalog_id;

Schema for aws_glue_catalog_database

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
catalog_idtextThe ID of the Data Catalog in which the database resides.
create_table_default_permissionsjsonbCreates a set of default permissions on the table for principals.
create_timetimestamp with time zoneThe time at which the metadata database was created in the catalog.
descriptiontextA description of the database.
federated_databasejsonbA FederatedDatabase structure that references an entity outside the Glue Data Catalog.
location_uritextThe location of the database (for example, an HDFS path).
nametext=The name of the database. For Hive compatibility, this is folded to lowercase when it is stored.
parametersjsonbThese key-value pairs define parameters and properties of the database.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
regiontextThe AWS Region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
target_databasejsonbA DatabaseIdentifier structure that describes a target database for resource linking.
titletextTitle 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