JDBC Driver for Shopify

Build 24.0.9187

Metafields

Retrieves a list of metafields that belong to a resource.

View-Specific Information

OwnerResource or the metafield Id is required for any query against Metafields.

OwnerResource must be one of the following values:

  • shop
  • draft_order
  • page
  • article
  • order
  • customer
  • collection
  • blog

Any other value will run the query against "shop" instead.

Select

The driver uses the Shopify API to process search criteria for all columns except Value and Description. The supported SQL operators are '=,IN' for the Id, OwnerResource and OwnerId columns, '=' for the Namespace, Key, Type columns and '=,<=,<,>,>=' for the CreatedAt and UpdatedAt columns. The driver processes other filters client-side within the driver.

For example, the following queries are processed server-side:

SELECT * FROM Metafields WHERE Id = 721389482

SELECT * FROM Metafields WHERE ID IN (SELECT Id FROM Customers)

SELECT * FROM Metafields WHERE ID IN (19422939054103, 19422939185175, 19422939250711, 19431415152663, 19431415185431)

SELECT * FROM Metafields WHERE OwnerId = 64146833431 AND OwnerResource = 'order'

SELECT * FROM Metafields WHERE OwnerId = 64146833431 AND OwnerResource IN ('order', 'customer')

SELECT * FROM Metafields WHERE OwnerId IN (64146833430, 64146833431) AND OwnerResource = 'order'

SELECT * FROM Metafields WHERE OwnerResource = 'customer' AND OwnerId IN (SELECT Id FROM Customers);

SELECT * FROM Metafields WHERE OwnerResource = 'order' AND OwnerId = '64146735127' AND UpdatedAt >= '2021-10-13T05:55:08-04:00';

SELECT * FROM Metafields WHERE OwnerResource = 'order' AND OwnerId = '64146735127' AND Type = 'multi_line_text_field';

Insert

You must specify the NameSpace, Key, and Value to create Metafields.

INSERT INTO Metafields (NameSpace, Key, Value, Type, Description, OwnerResource) VALUES ('inventory', 'warehouse', 25, 'number_integer', 'This is description about data', 'factory')

Update

You must specify the Id to update Metafields. For example:

UPDATE Metafields SET Value = 26 WHERE Id = 19712314851607

Delete

You must specify the Id of the Metafields to delete it.

DELETE FROM Metafields WHERE Id = 19712314851607

Columns

Name Type References Description
Id [KEY] Long The unique ID of the metafield.
Namespace String A container for a set of metafields. You need to define a custom namespace for your metafields to distinguish them from the metafields used by other apps.
Key String The name of the metafield.
Value String The information to be stored as metadata.
Type String The metafield's information type.
Description String A description of the information that the metafield contains.
OwnerId Long The unique ID of the resource that the metafield is attached to.
OwnerResource String The type of resource that the metafield is attached to.
CreatedAt Datetime The date and time (ISO 8601 format) when the metafield was created.
UpdatedAt Datetime The date and time (ISO 8601 format) when the metafield was last updated.
AdminGraphqlApiId String The admin graphql api id

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9187