Why Aren't My Selected Metafield Tables Syncing?
Question
I selected metafield tables in my Shopify connection schema, but some of them aren't syncing to my destination. Why are they missing, even though I see relevant data in Shopify?
Environment
Connector: Shopify
Answer
Fivetran does not create separate tables for Shopify metafield resources, such as PRODUCT_METAFIELD and CUSTOMER_METAFIELD. Instead, we sync all selected metafields to the METAFIELD table. The metafield resources shown in the Schema tab let you choose which metafields you want to sync, but they don't create separate tables in your destination.
To query metafields for a specific Shopify object type, filter the METAFIELD table using the owner_resource column. For example, to query product metafields, run:
SELECT * FROM METAFIELD WHERE owner_resource = 'product';
Shop metafields are empty in the GraphQL schema
If your connection is using the GraphQL schema and the METAFIELD table (which represents shop metafields with owner_resource = 'shop') is empty in the destination despite data existing in your Shopify store, check whether the SHOP table is selected in the schema tab.
On the GraphQL schema, shop metafields are fetched as part of the SHOP sync flow. If neither SHOP nor its child table FULFILLMENT_SERVICE is selected, the sync exits before making the shop metafields API call, and no data is written to the METAFIELD table.
Resolution: Select the SHOP table in the schema tab in addition to the METAFIELD table. The next sync will pick up the shop metafields data.
This dependency does not exist in the legacy schema, where the METAFIELD table syncs independently of the SHOP table.