steampipe plugin install marekjalovec/make

Table: make_data_store

Data Stores are used to store data from scenarios or for transferring data in between individual scenarios or scenario runs.

Key columns

  • Provide a numeric id if you want to query for a specific Team.
  • Provide a numeric team_id to query Data Stores for a specific Team. This can be either set directly in a where clause, or specified as part of join with another table.

Caveat

  • Be careful when requesting all columns (*) or the data_structure_id column without using an id in the query. To load this data, Steampipe will have to make one extra API request per Data Store returned.

Examples

List of all Data Stores in the account

select
o.name as organization_name,
t.name as team_name,
ds.name as data_store_name
from
make_organization o
join make_team t on t.organization_id = o.id
join make_data_store ds on ds.team_id = t.id;
-- or a simplified version
select
id,
name
from
make_data_store;

List of all Data Stores including data quota usage

select
o.name as organization_name,
t.name as team_name,
ds.name as data_store_name,
round(100.0 / max_size * size, 2) as ds_fill_perc
from
make_organization o
join make_team t on t.organization_id = o.id
join make_data_store ds on ds.team_id = t.id
order by
ds_fill_perc desc;

Usage of Data Store quota for the whole account

select
o.name org_name,
count(ds.id),
o.license ->> 'dslimit' dslimit,
round(
100.0 / cast(o.license ->> 'dslimit' as int) * count(ds.id),
2
) as usage_perc
from
make_data_store ds
join make_team t on t.id = ds.team_id
join make_organization o on o.id = t.organization_id
group by
o.name,
o.license
order by
org_name;

Detail of a Data Store

select
id,
name,
records,
size,
max_size,
data_structure_id
from
make_data_store
where
id = 1;

Schema for make_data_store

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
data_structure_idbigintData structure ID.
idbigint=The Data Store ID.
max_sizebigintThe maximum size of the data that the Data Store can store.
nametextThe name of the Data Store.
recordsbigintNumber of records in the Data Store.
sizebigintThe current size of the data in the Data Store.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
team_idbigintVirtual column, used to map the entity to another object.
titletextThe display name for the resource.