steampipe plugin install gcp

Table: gcp_dataplex_zone - Query GCP Dataplex Zones using SQL

GCP Dataplex Zones are logical groupings within a Dataplex Lake, designed to organize and manage data based on various criteria, such as data type, security requirements, or lifecycle management. Zones allow for granular control over data management and access within a Lake.

Table Usage Guide

The gcp_dataplex_zone table allows data engineers and cloud administrators to query and manage Dataplex Zones within their GCP environment. You can retrieve information about the zone's configuration, status, associated lake, and more. This table is useful for monitoring and managing the state and metadata of Dataplex Zones.

Examples

Basic info

Retrieve a list of all Dataplex Zones in your GCP account to get an overview of your managed data zones.

select
name,
display_name,
lake_name,
create_time,
type
from
gcp_dataplex_zone;
select
name,
display_name,
lake_name,
create_time,
type
from
gcp_dataplex_zone;

Dataplex zones by type

Explore the different types of Dataplex Zones to understand how your data is organized and managed within lakes.

select
type,
count(*)
from
gcp_dataplex_zone
group by
type;
select
type,
count(*)
from
gcp_dataplex_zone
group by
type;

Get details of zones in a specific state

Retrieve Dataplex Zones in a specific state (e.g., ACTIVE) to monitor their status.

select
name,
state,
create_time,
update_time
from
gcp_dataplex_zone
where
state = 'ACTIVE';
select
name,
state,
create_time,
update_time
from
gcp_dataplex_zone
where
state = 'ACTIVE';

Dataplex zones with their associated lakes

This is useful for understanding the relationship between zones and lakes in your Dataplex environment.

select
z.name as zone_name,
z.type as zone_type,
z.state as zone_state,
z.create_time as zone_create_time,
l.name as lake_name,
l.location as lake_location,
l.state as lake_state
from
gcp_dataplex_zone as z
join gcp_dataplex_lake as l on z.lake_name = l.name;
select
z.name as zone_name,
z.type as zone_type,
z.state as zone_state,
z.create_time as zone_create_time,
l.name as lake_name,
l.location as lake_location,
l.state as lake_state
from
gcp_dataplex_zone as z
join gcp_dataplex_lake as l on z.lake_name = l.name;

Schema for gcp_dataplex_zone

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
asset_statusjsonbAggregated status of the underlying assets of the zone.
create_timetimestamp with time zoneThe time when the zone was created.
descriptiontextDescription of the zone.
discovery_specjsonbSpecification of the discovery feature applied to data in this zone.
display_nametext=User friendly display name.
lake_nametext=The relative resource name of the lake.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
nametext=The relative resource name of the zone.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
resource_specjsonbSpecification of the resources that are referenced by the assets within this zone.
self_linktextServer-defined URL for the resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statetext=Current state of the zone.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
typetextThe type of the zone.
uidtextSystem generated globally unique ID for the zone.
update_timetimestamp with time zoneThe time when the zone was last updated.

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)" -- gcp

You can pass the configuration to the command with the --config argument:

steampipe_export_gcp --config '<your_config>' gcp_dataplex_zone