Table: shopify_theme - Query Shopify Themes using SQL
Shopify Themes are the templates that determine the look and feel of a Shopify store. They provide the framework for all the content seen by customers when they visit the online store. Themes can be customized, and Shopify stores can have multiple themes installed, but only one can be published and active at a time.
Table Usage Guide
The shopify_theme
table provides insights into the themes used within a Shopify store. As a store owner or a web developer, explore theme-specific details through this table, including theme roles, theme names, and associated metadata. Utilize it to uncover information about themes, such as the currently active theme, the previewable themes, and the customization options available for each theme.
Examples
Basic info
Discover the segments that include the unique identifiers, names, and roles of your Shopify themes to assess their availability for preview. This can be useful in managing and organizing your store's visual presentation.
select id, name, previewable, rolefrom shopify_theme;
select id, name, previewable, rolefrom shopify_theme;
Get the names and IDs of all themes that are previewable
Discover the themes that are previewable to understand which themes are available for preview, helping you to make informed decisions about theme selection.
select id, namefrom shopify_themewhere previewable = true;
select id, namefrom shopify_themewhere previewable = 1;
Get the name and creation date of the oldest processing theme
Explore which theme has been processing for the longest time on your Shopify store. This can help identify potential performance issues or bottlenecks in your store's theme management.
select name, created_atfrom shopify_themewhere processing = trueorder by created_at asclimit 1;
select name, created_atfrom shopify_themewhere processing = 1order by created_at asclimit 1;
Get the themes that were last updated within the past 30 days
Gain insights into the themes that have been updated recently. This query is particularly useful for keeping track of theme modifications and ensuring your website stays current and functional.
select name, id, updated_atfrom shopify_themewhere updated_at >= now() - interval '30 days';
select name, id, updated_atfrom shopify_themewhere updated_at >= datetime('now', '-30 days');
Schema for shopify_theme
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
admin_graphql_api_id | text | The admin graphql API ID. | |
created_at | timestamp with time zone | The create time of the theme. | |
id | bigint | = | The ID of the theme. |
name | text | The name of the theme. | |
previewable | boolean | Whether the website is previewable. | |
processing | boolean | Whether the website is processing. | |
role | text | The role of the theme. | |
shop_name | text | =, !=, ~~, ~~*, !~~, !~~* | The name of the shop. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
theme_store_id | bigint | The store ID of the theme. | |
title | text | Title of the resource. | |
updated_at | timestamp with time zone | The update time of the theme. |
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)" -- shopify
You can pass the configuration to the command with the --config
argument:
steampipe_export_shopify --config '<your_config>' shopify_theme