Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update table docs #48

Merged
merged 7 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/steampipe-anywhere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release Steampipe Anywhere Components

on:
push:
tags:
- 'v*'


jobs:
anywhere_publish_workflow:
uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main
secrets: inherit
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ where
and last_success_login is not null;
```

## Engines

This plugin is available for the following engines:

| Engine | Description
|---------------|------------------------------------------
| [Steampipe](https://steampipe.io/docs) | The Steampipe CLI exposes APIs and services as a high-performance relational database, giving you the ability to write SQL-based queries to explore dynamic data. Mods extend Steampipe's capabilities with dashboards, reports, and controls built with simple HCL. The Steampipe CLI is a turnkey solution that includes its own Postgres database, plugin management, and mod support.
| [Postgres FDW](https://steampipe.io/docs/steampipe_postgres/index) | Steampipe Postgres FDWs are native Postgres Foreign Data Wrappers that translate APIs to foreign tables. Unlike Steampipe CLI, which ships with its own Postgres server instance, the Steampipe Postgres FDWs can be installed in any supported Postgres database version.
| [SQLite Extension](https://steampipe.io/docs//steampipe_sqlite/index) | Steampipe SQLite Extensions provide SQLite virtual tables that translate your queries into API calls, transparently fetching information from your API or service as you request it.
| [Export](https://steampipe.io/docs/steampipe_export/index) | Steampipe Plugin Exporters provide a flexible mechanism for exporting information from cloud services and APIs. Each exporter is a stand-alone binary that allows you to extract data using Steampipe plugins without a database.
| [Turbot Pipes](https://turbot.com/pipes/docs) | Turbot Pipes is the only intelligence, automation & security platform built specifically for DevOps. Pipes provide hosted Steampipe database instances, shared dashboards, snapshots, and more.

## Developing

Prerequisites:
Expand Down Expand Up @@ -71,11 +83,17 @@ Further reading:
- [Writing plugins](https://steampipe.io/docs/develop/writing-plugins)
- [Writing your first table](https://steampipe.io/docs/develop/writing-your-first-table)

## Contributing
## Open Source & Contributing

This repository is published under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) (source code) and [CC BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/2.0/) (docs) licenses. Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!

[Steampipe](https://steampipe.io) is a product produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).

## Get Involved

Please see the [contribution guidelines](https://github.com/turbot/steampipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/steampipe/blob/main/CODE_OF_CONDUCT.md). All contributions are subject to the [Apache 2.0 open source license](https://github.com/turbot/steampipe-plugin-snowflake/blob/main/LICENSE).
**[Join #steampipe on Slack →](https://turbot.com/community/join)**

`help wanted` issues:
Want to help but don't know where to start? Pick up one of the `help wanted` issues:

- [Steampipe](https://github.com/turbot/steampipe/labels/help%20wanted)
- [Snowflake Plugin](https://github.com/turbot/steampipe-plugin-snowflake/labels/help%20wanted)
6 changes: 2 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ name: "snowflake"
description: "Steampipe plugin for querying roles, databases, and more from Snowflake."
og_description: "Query Snowflake with SQL! Open source CLI. No DB required."
og_image: "/images/plugins/turbot/snowflake-social-graphic.png"
engines: ["steampipe", "sqlite", "postgres", "export"]
---

# Snowflake + Steampipe

[Snowflake](https://app.snowflake.com/) enables data storage, processing, and analytic solutions that are faster, easier to use, and far more flexible than traditional offerings.

[Steampipe](https://steampipe.io) is an open source CLI to instantly query cloud APIs using SQL.
[Steampipe](https://steampipe.io) is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

For example, to list inactive users:

Expand Down Expand Up @@ -195,7 +196,4 @@ connection "snowflake" {
}
```

## Get involved

- Open source: https://github.com/turbot/steampipe-plugin-snowflake
- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)
42 changes: 38 additions & 4 deletions docs/tables/snowflake_account_grant.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
# Table: snowflake_account_grant
---
title: "Steampipe Table: snowflake_account_grant - Query Snowflake Account Grants using SQL"
description: "Allows users to query Snowflake Account Grants, specifically the grantee name, granted on date, and privilege details, providing insights into account-level access permissions."
---

List all account-level, i.e., global, privileges that have been granted to roles.
# Table: snowflake_account_grant - Query Snowflake Account Grants using SQL

Snowflake Account Grants are resources within Snowflake that allow you to manage and monitor permissions granted at the account level. These permissions can be granted to roles, users, or other entities within the Snowflake environment. The account grant includes details about the grantee, the granted on date, and the specific privilege granted.

## Table Usage Guide

The `snowflake_account_grant` table provides insights into account-level permissions within Snowflake. As a Security Analyst, explore grant-specific details through this table, including the grantee name, granted on date, and privilege details. Utilize it to uncover information about permissions, such as who has been granted what privileges, when the privileges were granted, and the specifics of the privileges.

## Examples

### Basic info
Explore the details of your Snowflake account's access permissions to understand who has been granted what privileges, by whom, and when. This can help in maintaining security and compliance by ensuring appropriate access levels are maintained.

```sql
```sql+postgres
select
name,
privilege,
grantee_name,
granted_to,
grant_option,
created_on
from
snowflake_account_grant;
```

```sql+sqlite
select
name,
privilege,
Expand All @@ -19,8 +41,9 @@ from
```

### List privileges with the ACCOUNTADMIN role
Explore which privileges are associated with the account administrator role. This can be useful for understanding the level of access and permissions granted to this role within your Snowflake account.

```sql
```sql+postgres
select
privilege,
grant_option,
Expand All @@ -30,3 +53,14 @@ from
where
grantee_name = 'ACCOUNTADMIN';
```

```sql+sqlite
select
privilege,
grant_option,
created_on
from
snowflake_account_grant
where
grantee_name = 'ACCOUNTADMIN';
```
56 changes: 50 additions & 6 deletions docs/tables/snowflake_account_parameter.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# Table: snowflake_account_parameter
---
title: "Steampipe Table: snowflake_account_parameter - Query Snowflake Account Parameters using SQL"
description: "Allows users to query Snowflake Account Parameters, specifically retrieving the current settings and defaults for various parameters in Snowflake accounts."
---

Snowflake provides parameters that let you control the behavior of your account, individual user sessions, and objects. All the parameters have default values, which can be set and then overridden at different levels depending on the parameter type (Account, Session, or Object).
# Table: snowflake_account_parameter - Query Snowflake Account Parameters using SQL

Account parameters can be set only at the account level by users with the appropriate administrator role.
Snowflake Account Parameters are a collection of settings and defaults that govern the behavior of Snowflake accounts. These parameters include settings related to data storage, query processing, security, and other operational aspects of Snowflake accounts. They provide a way to customize and tune the behavior of Snowflake accounts to meet specific requirements or preferences.

## Table Usage Guide

The `snowflake_account_parameter` table provides insights into the settings and defaults of Snowflake Account Parameters. As a Database Administrator or Data Engineer, explore parameter-specific details through this table, including names, values, and descriptions. Utilize it to uncover information about parameters, such as their current settings, default values, and the impact of these parameters on the operation of Snowflake accounts.

## Examples

### Basic info
Explore which account parameters are set in your Snowflake account to understand and manage your account configurations better. This can be particularly useful when auditing your account settings or troubleshooting issues related to account parameters.

```sql+postgres
select
key,
value,
level,
description
from
snowflake_account_parameter;
```

```sql
```sql+sqlite
select
key,
value,
Expand All @@ -19,8 +37,21 @@ from
```

### Check whether account allows MFA caching
Assess the elements within your account to understand if multi-factor authentication (MFA) caching is permitted. This is useful for enhancing security measures by managing how user authentication data is stored.

```sql+postgres
select
key,
value,
level,
description
from
snowflake_account_parameter
where
key = 'ALLOW_CLIENT_MFA_CACHING';
```

```sql
```sql+sqlite
select
key,
value,
Expand All @@ -33,8 +64,9 @@ where
```

### Get number of days Snowflake retains historical data for performing Time Travel actions (SELECT, CLONE, UNDROP) on the object
Analyze the settings to understand the duration for which Snowflake preserves historical data, which can be crucial for executing actions such as Time Travel on objects. This can be beneficial for data recovery and auditing purposes.

```sql
```sql+postgres
select
key,
value,
Expand All @@ -45,3 +77,15 @@ from
where
key = 'DATA_RETENTION_TIME_IN_DAYS';
```

```sql+sqlite
select
key,
value,
level,
description
from
snowflake_account_parameter
where
key = 'DATA_RETENTION_TIME_IN_DAYS';
```
45 changes: 41 additions & 4 deletions docs/tables/snowflake_database.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
# Table: snowflake_database
---
title: "Steampipe Table: snowflake_database - Query Snowflake Databases using SQL"
description: "Allows users to query Snowflake Databases, providing detailed information about each database within the Snowflake data warehousing platform."
---

All data in Snowflake is maintained in databases. Each database consists of one or more schemas, which are logical groupings of database objects, such as tables and views.
# Table: snowflake_database - Query Snowflake Databases using SQL

Snowflake is a cloud-based data warehousing platform that provides comprehensive solutions for data storage, processing, and analysis. It supports a wide range of data types, including structured and semi-structured data, and allows for seamless scaling of resources to meet the demands of any size of data workload. Snowflake databases are a key resource within this platform, housing the data that is processed and analyzed.

## Table Usage Guide

The `snowflake_database` table provides insights into databases within the Snowflake data warehousing platform. As a data engineer or analyst, explore database-specific details through this table, including ownership, creation time, and associated metadata. Utilize it to uncover information about databases, such as their size, the number of tables they contain, and their overall usage statistics.

## Examples

### Basic info
Explore the creation dates, current status, origin, owner, and retention time of your databases in Snowflake to understand their management and maintenance history. This is useful to assess the operational aspects of your databases and for future planning.

```sql+postgres
select
name,
created_on,
is_current,
origin,
owner,
retention_time
from
snowflake_database;
```

```sql
```sql+sqlite
select
name,
created_on,
Expand All @@ -19,8 +41,9 @@ from
```

### List databases with retention time greater than 1 day
Explore which databases have a retention time greater than a day. This is useful for understanding the longevity of your data and managing storage resources effectively.

```sql
```sql+postgres
select
name,
created_on,
Expand All @@ -33,3 +56,17 @@ from
where
retention_time > 1;
```

```sql+sqlite
select
name,
created_on,
is_current,
origin,
owner,
retention_time
from
snowflake_database
where
retention_time > 1;
```
44 changes: 39 additions & 5 deletions docs/tables/snowflake_database_grant.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
# Table: snowflake_database_grant
---
title: "Steampipe Table: snowflake_database_grant - Query Snowflake Database Grants using SQL"
description: "Allows users to query Snowflake Database Grants, specifically providing insights into the permissions assigned to various roles and users."
---

List privileges that have been granted on the database.
# Table: snowflake_database_grant - Query Snowflake Database Grants using SQL

**Note**: This table requires an '=' qualifier for the `database` column.
Snowflake Database Grant is a feature within Snowflake's data cloud platform that allows you to manage and assign permissions to roles and users. It is a crucial aspect of Snowflake's security model, enabling you to control who has access to your data and what they can do with it. Snowflake Database Grant helps you maintain a secure and compliant data environment by ensuring the right access levels are assigned to the right roles and users.

## Table Usage Guide

The `snowflake_database_grant` table provides insights into the database grants within Snowflake's data cloud platform. As a Database Administrator, you can explore grant-specific details through this table, including roles, users, and the specific permissions assigned to them. Utilize it to uncover information about database access levels, such as those with full permissions, the roles assigned to specific users, and the verification of user privileges.

## Examples

### Basic info
Explore which privileges have been granted to different users in a specific database. This can help in managing user access and maintaining database security.

```sql+postgres
select
database,
privilege,
grantee_name,
granted_to,
grant_option
from
snowflake_database_grant where database = 'SNOWFLAKE';
```

```sql
```sql+sqlite
select
database,
privilege,
Expand All @@ -20,8 +39,9 @@ from
```

### List grants for all databases
Explore which privileges have been granted to various users across all databases. This can be useful for assessing security measures and understanding user access levels in a Snowflake environment.

```sql
```sql+postgres
select
database,
privilege,
Expand All @@ -34,3 +54,17 @@ from
snowflake_database
on snowflake_database_grant.database = snowflake_database.name;
```

```sql+sqlite
select
database,
privilege,
grantee_name,
granted_to,
grant_option
from
snowflake_database_grant
inner join
snowflake_database
on snowflake_database_grant.database = snowflake_database.name;
```
Loading