Skip to content

Commit

Permalink
Improve table docs (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
misraved authored Dec 12, 2023
1 parent f058deb commit 621ba34
Show file tree
Hide file tree
Showing 13 changed files with 1,631 additions and 99 deletions.
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 @@ -72,6 +72,18 @@ from
+---------------+-------+-----------------------------+-----------------+---------+---------+----------+
```

## 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/overview) | 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/overview) | 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/overview) | 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 @@ -111,11 +123,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-shopify/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)
- [Shopify Plugin](https://github.com/turbot/steampipe-plugin-shopify/labels/help%20wanted)
402 changes: 402 additions & 0 deletions docs/LICENSE

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ short_name: "shopify"
description: "Steampipe plugin to query products, order, customers and more from Shopify."
og_description: "Query Shopify with SQL! Open source CLI. No DB required."
og_image: "/images/plugins/turbot/shopify-social-graphic.png"
engines: ["steampipe", "sqlite", "postgres", "export"]
---

# Shopify + Steampipe

[Shopify](https://shopify.com/) is an e-commerce platform that allows businesses to create and manage online stores.

[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.

List Shopify order details:

Expand Down Expand Up @@ -93,7 +94,4 @@ export SHOPIFY_API_TOKEN=shpat_ab0a4zaa19c3faketoken924176b387d
export SHOPIFY_SHOP_NAME=theshop
```

## Get involved

- Open source: https://github.com/turbot/steampipe-plugin-shopify
- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)
)
109 changes: 101 additions & 8 deletions docs/tables/shopify_collection_product.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
# Table: shopify_collection_product
---
title: "Steampipe Table: shopify_collection_product - Query Shopify Collection Products using SQL"
description: "Allows users to query Collection Products in Shopify, specifically the associated product details and collection information, providing insights into product categorization and organization."
---

Shopify collection products are a group of related products that are curated and organized together by a store owner on the Shopify platform.
# Table: shopify_collection_product - Query Shopify Collection Products using SQL

Shopify Collection Products represent the relationship between products and their associated collections within the Shopify platform. Collections are a way to group and organize products, making them easier to manage and find. They can be created manually, or they can be automatically generated based on conditions that you specify.

## Table Usage Guide

The `shopify_collection_product` table provides insights into the relationship between products and collections within Shopify. As a store manager or developer, explore product-specific details and their collection associations through this table, including collection IDs, product IDs, and position in the collection. Utilize it to uncover information about product organization, such as which products belong to which collections, and the order of products within collections.

## Examples

### Basic info
Explore which products are included in your Shopify collections, along with their vendors and status. This can help you manage and organize your products more effectively.

```sql
```sql+postgres
select
collection_id,
collection_title,
product_id,
product_title,
vendor,
status
from
shopify_collection_product;
```

```sql+sqlite
select
collection_id,
collection_title,
Expand All @@ -19,8 +41,23 @@ from
```

### List all products in a specific collection by collection ID
Explore which products belong to a certain collection using a unique identifier, allowing you to assess the range and variety within that collection. This could be useful for inventory management or identifying gaps in your product offerings.

```sql
```sql+postgres
select
collection_id,
product_id,
product_title,
handle,
vendor,
status
from
shopify_collection_product
where
collection_id = 444300460327;
```

```sql+sqlite
select
collection_id,
product_id,
Expand All @@ -35,8 +72,24 @@ where
```

### List all products in a specific collection by collection title
Explore which products fall under a specific collection in your Shopify store. This is particularly useful to assess the range of items within a given collection, aiding in inventory management and marketing efforts.

```sql+postgres
select
collection_id,
product_id,
product_title,
collection_title,
handle,
vendor,
status
from
shopify_collection_product
where
collection_title = 'Jelly';
```

```sql
```sql+sqlite
select
collection_id,
product_id,
Expand All @@ -52,8 +105,19 @@ where
```

### Get the total count of products in each collection
Explore which collections have the most products to better manage inventory and sales strategies. This allows for a comprehensive understanding of product distribution across different collections.

```sql
```sql+postgres
select
collection_title,
count(*) as total_count
from
shopify_collection_product
group by
collection_title;
```

```sql+sqlite
select
collection_title,
count(*) as total_count
Expand All @@ -64,8 +128,21 @@ group by
```

### Get the number of products in each collection that are currently in stock
Explore which collections have products currently in stock. This query is useful for inventory management, allowing you to see the distribution of available products across different collections.

```sql
```sql+postgres
select
collection_title,
count(*) as total_count
from
shopify_collection_product
where
status = 'in_stock'
group by
collection_title;
```

```sql+sqlite
select
collection_title,
count(*) as total_count
Expand All @@ -78,8 +155,9 @@ group by
```

### List all the products in a collection created in the last one month
Identify all the products added to any collection within the past month. This can assist in understanding recent inventory changes and tracking product performance.

```sql
```sql+postgres
select
collection_id,
collection_title,
Expand All @@ -92,4 +170,19 @@ from
shopify_collection_product
where
created_at >= now() - interval '30' day;
```

```sql+sqlite
select
collection_id,
collection_title,
product_id,
product_title,
vendor,
status,
created_at
from
shopify_collection_product
where
created_at >= datetime('now', '-30 day');
```
Loading

0 comments on commit 621ba34

Please sign in to comment.