Fulfillment Count by Customer Accepts Marketing

This is a sample query that you can use on airbyte-shopify fulfillments data when you connect it to Splitgraph.

use tools
SELECT customers.accepts_marketing AS "customers.accepts_marketing"
     , count(1) AS "fulfillments.count"
FROM "your-username~shopify".fulfillments
     LEFT JOIN "your-username~shopify".orders AS orders ON fulfillments.order_id = orders.id
     LEFT JOIN "your-username~shopify".customers AS customers ON CAST((jsonb_extract_path_text(orders.customer, 'id')) AS integer) = customers.id
GROUP BY 1
ORDER BY 1
Use this query
Connect your Shopify data to Splitgraph to run this query now.

Tables available in the Shopify data source

Here are all the tables you will be able to access when you use Splitgraph to query Shopify data. We have also listed some useful queries that you can run.

fulfillments

See all sample queries
 
  •  
    Fulfillment Count by Customer Accepts Marketing
  •  
    Fulfillment Count by Customer Admin Graphql Api
  •  
    Fulfillment Count by Customer Currency
repositories:
- namespace: CHANGEME
  repository: airbyte-shopify
  # Catalog-specific metadata for the repository. Optional.
  metadata:
    readme:
      text: Readme
    description: Description of the repository
    topics:
    - sample_topic
  # Data source settings for the repository. Optional.
  external:
    # Name of the credential that the plugin uses. This can also be a credential_id if the
    # credential is already registered on Splitgraph.
    credential: airbyte-shopify
    plugin: airbyte-shopify
    # Plugin-specific parameters matching the plugin's parameters schema
    params:
      shop: ''  # REQUIRED. Shopify Store. The name of your Shopify store found in the URL. For example, if your URL was https://NAME.myshopify.com, then the name would be 'NAME'.
      start_date: '2021-01-01' # REQUIRED. Replication Start Date. The date you would like to replicate data from. Format: YYYY-MM-DD. Any data before this date will not be replicated.
      normalization_mode: basic # Post-ingestion normalization. Whether to normalize raw Airbyte tables. `none` is no normalization, `basic` is Airbyte's basic normalization, `custom` is a custom dbt transformation on the data.. One of none, basic, custom
      normalization_git_branch: master # dbt model Git branch. Branch or commit hash to use for the normalization dbt project.
    tables:
      sample_table:
        # Plugin-specific table parameters matching the plugin's schema
        options:
          airbyte_cursor_field: []  # Cursor field(s). Fields in this stream to be used as a cursor for incremental replication (overrides Airbyte configuration's cursor_field)
          airbyte_primary_key_field: [] # Primary key field(s). Fields in this stream to be used as a primary key for deduplication (overrides Airbyte configuration's primary_key)
        # Schema of the table, a list of objects with `name` and `type`. If set to `[]`, will infer. 
        schema: []
    # Whether live querying is enabled for the plugin (creates a "live" tag in the
    # repository proxying to the data source). The plugin must support live querying.
    is_live: false
    # Ingestion schedule settings. Disable this if you're using GitHub Actions or other methods
    # to trigger ingestion.
    schedule:
credentials:
  airbyte-shopify:  # This is the name of this credential that "external" sections can reference.
    plugin: airbyte-shopify
    # Credential-specific data matching the plugin's credential schema
    data:
      normalization_git_url: ''  # dbt model Git URL. For `custom` normalization, a URL to the Git repo with the dbt project, for example,`https://uname:pass_or_token@github.com/organisation/repository.git`.
      credentials: # Shopify Authorization Method. The authorization method to use to retrieve data from Shopify. Choose one of:
      -  # API Password. API Password Auth
        auth_method: api_password  # REQUIRED. Constant
        api_password: '' # REQUIRED. API Password. The API Password for your private application in the `Shopify` store.
Use Data Source in splitgraph.yml
You can copy this into splitgraph.yml, or we'll generate it for you.

Developer-first

Use our splitgraph.yml format to check your Splitgraph configuration into version control, trigger ingestion jobs and manage your data stack like your code.

Get started
 

What is Splitgraph?

Splitgraph is a data API to power your analytics, data visualizations and other read-intensive applications.

Get started
 
heart-icon

Why Splitgraph and Shopify?

Splitgraph connects your vast, unrelated data sources and puts them in a single, accessible place.

Unify your data stack

Splitgraph handles data integration, storage, transformation and discoverability for you. All that remains is adding a BI client.

Read more
 

Power your applications

Focus on building data-driven applications without worrying about where the data will come from.

heart-icon

Not just Data Source...

Splitgraph supports data ingestion from over 100 SaaS services, as well as data federation to over a dozen databases. These are all made queryable over a PostgreSQL-compatible interface.

heart-icon

Optimized for analytics

Splitgraph stores data in a columnar format. This accelerates analytical queries and makes it perfect for dashboards, blogs and other read-intensive use cases.

use-tools

Do more with Shopify?

heart-icon

Shopify on Splitgraph

Read more about Splitgraph’s support for Shopify, including its documentation and sample queries you can run on Shopify data with Splitgraph.

Shopify overview
 
heart-icon

Connecting to Splitgraph

Splitgraph has a PostgreSQL-compatible endpoint that most BI clients can connect to.

Try it out