ドキュメントメニュー

Shopify#

ショップのドメインと Admin API トークンを使って Shopify を接続します。このソースは titan.shopify に 19 個の固定テーブルを書き込みます。

sql
select
  id,
  email,
  created_at
from titan.shopify.customers
limit 10

Shopifyを接続する#

  1. アプリを開き、アプリを接続を選択してから、Shopifyを選択します。

  2. ショップのドメインと Admin API トークンを入力します。

  3. テーブルを確認してからソースを保存します。

  4. 初回の実行が完了するまで同期履歴を確認します。

認証情報はシークレットとして保存されます。レイクの列になったり、クエリ結果に表示されたりすることはありません。

同期の動作#

Shopify のデータは、再開可能な GraphQL の一括処理で取得します。一括処理の ID を保存するため、次回の実行では最初からやり直さずに再開できます。

新しいソースは接続時に同期し、その後はスケジュールに従います。デフォルトのスケジュールでは、組織のタイムゾーンで平日の 5:00、10:00、15:00、20:00 と日曜日の 20:00 に同期し、各ソースはその時刻から 30 分以内に開始します。実行が中断しても、完了した進捗を保持して安全に再試行します。

すべてのレイクのテーブルにはシステム列 _synced_at と _deleted もあります。以下の列リファレンスにはソースの列のみを記載しています。

テーブルリファレンス#

customers#

titan.shopify.customers には 17 個のソース列があります。

shopify.customers17列
idintegerpk

ソースのフィールド id。

emailstring

ソースのフィールド email。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

first_namestring

ソースのフィールド firstName。

last_namestring

ソースのフィールド lastName。

phonestring

ソースのフィールド phone。

number_of_ordersinteger

ソースのフィールド numberOfOrders。

multipass_identifierstring

ソースのフィールド multipassIdentifier。

notestring

ソースのフィールド note。

statestring

ソースのフィールド state。

tax_exemptboolean

ソースのフィールド taxExempt。

amount_spentjson

ソースのフィールド amountSpent。

verified_emailboolean

ソースのフィールド verifiedEmail。

currency_codestring

ソースのフィールド currencyCode。

tagsjson

ソースのフィールド tags。

mailing_addresses#

titan.shopify.mailing_addresses には 17 個のソース列があります。

shopify.mailing_addresses17列
idintegerpk

ソースのフィールド id。

customer_idinteger

ソースのフィールド customerId。

first_namestring

ソースのフィールド firstName。

last_namestring

ソースのフィールド lastName。

address1string

ソースのフィールド address1。

address2string

ソースのフィールド address2。

citystring

ソースのフィールド city。

companystring

ソースのフィールド company。

coordinates_validatedboolean

ソースのフィールド coordinatesValidated。

phonestring

ソースのフィールド phone。

countrystring

ソースのフィールド country。

country_codestring

ソースのフィールド countryCode。

provincestring

ソースのフィールド province。

province_codestring

ソースのフィールド provinceCode。

zipstring

ソースのフィールド zip。

latitudefloat

ソースのフィールド latitude。

longitudefloat

ソースのフィールド longitude。

orders#

titan.shopify.orders には 42 個のソース列があります。

shopify.orders42列
idintegerpk

ソースのフィールド id。

notestring

ソースのフィールド note。

emailstring

ソースのフィールド email。

taxes_includedboolean

ソースのフィールド taxesIncluded。

currency_codestring

ソースのフィールド currencyCode。

namestring

ソースのフィールド name。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

subtotal_price_setjson

ソースのフィールド subtotalPriceSet。

total_tax_setjson

ソースのフィールド totalTaxSet。

total_price_setjson

ソースのフィールド totalPriceSet。

total_discounts_setjson

ソースのフィールド totalDiscountsSet。

total_tip_received_setjson

ソースのフィールド totalTipReceivedSet。

total_shipping_price_setjson

ソースのフィールド totalShippingPriceSet。

current_total_price_setjson

ソースのフィールド currentTotalPriceSet。

current_total_discounts_setjson

ソースのフィールド currentTotalDiscountsSet。

current_subtotal_price_setjson

ソースのフィールド currentSubtotalPriceSet。

current_total_tax_setjson

ソースのフィールド currentTotalTaxSet。

original_total_duties_setjson

ソースのフィールド originalTotalDutiesSet。

total_weightinteger

ソースのフィールド totalWeight。

source_namestring

ソースのフィールド sourceName。

client_ipstring

ソースのフィールド clientIp。

shipping_addressjson

ソースのフィールド shippingAddress。

billing_addressjson

ソースのフィールド billingAddress。

customer_idinteger

ソースのフィールド customerId。

retail_locationjson

ソースのフィールド retailLocation。

app_idinteger

ソースのフィールド appId。

po_numberstring

ソースのフィールド poNumber。

display_financial_statusstring

ソースのフィールド displayFinancialStatus。

display_fulfillment_statusstring

ソースのフィールド displayFulfillmentStatus。

processed_atdatetime

ソースのフィールド processedAt。

customer_journey_summaryjson

ソースのフィールド customerJourneySummary。

cancel_reasonstring

ソースのフィールド cancelReason。

cancelled_atdatetime

ソースのフィールド cancelledAt。

closed_atdatetime

ソースのフィールド closedAt。

customer_accepts_marketingboolean

ソースのフィールド customerAcceptsMarketing。

confirmedboolean

ソースのフィールド confirmed。

presentment_currency_codestring

ソースのフィールド presentmentCurrencyCode。

status_page_urlstring

ソースのフィールド statusPageUrl。

tagsjson

ソースのフィールド tags。

transactionsjson

ソースのフィールド transactions。

custom_attributesjson

ソースのフィールド customAttributes。

order_line_items#

titan.shopify.order_line_items には 23 個のソース列があります。

shopify.order_line_items23列
idintegerpk

ソースのフィールド id。

order_idinteger

ソースのフィールド orderId。

product_idinteger

ソースのフィールド productId。

variant_idinteger

ソースのフィールド variantId。

titlestring

ソースのフィールド title。

namestring

ソースのフィールド name。

quantityinteger

ソースのフィールド quantity。

current_quantityinteger

ソースのフィールド currentQuantity。

variantjson

ソースのフィールド variant。

tax_linesjson

ソースのフィールド taxLines。

vendorstring

ソースのフィールド vendor。

skustring

ソースのフィールド sku。

custom_attributesjson

ソースのフィールド customAttributes。

discounted_unit_price_after_all_discounts_setjson

ソースのフィールド discountedUnitPriceAfterAllDiscountsSet。

discounted_total_setjson

ソースのフィールド discountedTotalSet。

discounted_unit_price_setjson

ソースのフィールド discountedUnitPriceSet。

original_total_setjson

ソースのフィールド originalTotalSet。

original_unit_price_setjson

ソースのフィールド originalUnitPriceSet。

taxableboolean

ソースのフィールド taxable。

total_discount_setjson

ソースのフィールド totalDiscountSet。

unfulfilled_original_total_setjson

ソースのフィールド unfulfilledOriginalTotalSet。

unfulfilled_quantityinteger

ソースのフィールド unfulfilledQuantity。

variant_titlestring

ソースのフィールド variantTitle。

discount_applications#

titan.shopify.discount_applications には 8 個のソース列があります。

shopify.discount_applications8列
order_idintegerpk

ソースのフィールド orderId。

indexintegerpk

ソースのフィールド index。

target_selectionstring

ソースのフィールド targetSelection。

target_typestring

ソースのフィールド targetType。

valuejson

ソースのフィールド value。

codestring

ソースのフィールド code。

typestring

ソースのフィールド type。

allocation_methodstring

ソースのフィールド allocationMethod。

refunds#

titan.shopify.refunds には 6 個のソース列があります。

shopify.refunds6列
idintegerpk

ソースのフィールド id。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

notestring

ソースのフィールド note。

restockboolean

ソースのフィールド restock。

order_idinteger

ソースのフィールド orderId。

order_adjustments#

titan.shopify.order_adjustments には 6 個のソース列があります。

shopify.order_adjustments6列
idintegerpk

ソースのフィールド id。

order_idinteger

ソースのフィールド orderId。

refund_idinteger

ソースのフィールド refundId。

amount_setjson

ソースのフィールド amountSet。

tax_amount_setjson

ソースのフィールド taxAmountSet。

reasonstring

ソースのフィールド reason。

refund_line_items#

titan.shopify.refund_line_items には 10 個のソース列があります。

shopify.refund_line_items10列
idintegerpk

ソースのフィールド id。

refund_idinteger

ソースのフィールド refundId。

location_idinteger

ソースのフィールド locationId。

line_item_idinteger

ソースのフィールド lineItemId。

subtotal_setjson

ソースのフィールド subtotalSet。

price_setjson

ソースのフィールド priceSet。

total_tax_setjson

ソースのフィールド totalTaxSet。

quantityinteger

ソースのフィールド quantity。

restockedboolean

ソースのフィールド restocked。

restock_typestring

ソースのフィールド restockType。

inventory_items#

titan.shopify.inventory_items には 16 個のソース列があります。

shopify.inventory_items16列
idintegerpk

ソースのフィールド id。

skustring

ソースのフィールド sku。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

requires_shippingboolean

ソースのフィールド requiresShipping。

unit_costjson

ソースのフィールド unitCost。

country_code_of_originstring

ソースのフィールド countryCodeOfOrigin。

province_code_of_originstring

ソースのフィールド provinceCodeOfOrigin。

trackedboolean

ソースのフィールド tracked。

tracked_editablejson

ソースのフィールド trackedEditable。

inventory_history_urlstring

ソースのフィールド inventoryHistoryUrl。

duplicate_sku_countinteger

ソースのフィールド duplicateSkuCount。

measurementjson

ソースのフィールド measurement。

harmonized_system_codestring

ソースのフィールド harmonizedSystemCode。

legacy_resource_idinteger

ソースのフィールド legacyResourceId。

variant_idinteger

ソースのフィールド variantId。

inventory_levels#

titan.shopify.inventory_levels には 5 個のソース列があります。

shopify.inventory_levels5列
idintegerpk

ソースのフィールド id。

inventory_item_idintegerpk

ソースのフィールド inventoryItemId。

location_idintegerpk

ソースのフィールド locationId。

updated_atdatetime

ソースのフィールド updatedAt。

quantitiesjson

ソースのフィールド quantities。

locations#

titan.shopify.locations には 6 個のソース列があります。

shopify.locations6列
idintegerpk

ソースのフィールド id。

addressjson

ソースのフィールド address。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

is_activeboolean

ソースのフィールド isActive。

namestring

ソースのフィールド name。

products#

titan.shopify.products には 14 個のソース列があります。

shopify.products14列
idintegerpk

ソースのフィールド id。

titlestring

ソースのフィールド title。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

published_atdatetime

ソースのフィールド publishedAt。

handlestring

ソースのフィールド handle。

product_typestring

ソースのフィールド productType。

vendorstring

ソースのフィールド vendor。

statusstring

ソースのフィールド status。

template_suffixstring

ソースのフィールド templateSuffix。

tagsjson

ソースのフィールド tags。

descriptionstring

ソースのフィールド description。

description_htmlstring

ソースのフィールド descriptionHtml。

product_variants#

titan.shopify.product_variants には 23 個のソース列があります。

shopify.product_variants23列
idintegerpk

ソースのフィールド id。

barcodestring

ソースのフィールド barcode。

compare_at_pricefloat

ソースのフィールド compareAtPrice。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

display_namestring

ソースのフィールド displayName。

inventory_item_idinteger

ソースのフィールド inventoryItemId。

inventory_quantityinteger

ソースのフィールド inventoryQuantity。

legacy_resource_idinteger

ソースのフィールド legacyResourceId。

positioninteger

ソースのフィールド position。

pricefloat

ソースのフィールド price。

product_idinteger

ソースのフィールド productId。

requires_componentsboolean

ソースのフィールド requiresComponents。

selected_optionsjson

ソースのフィールド selectedOptions。

sellable_online_quantityinteger

ソースのフィールド sellableOnlineQuantity。

show_unit_priceboolean

ソースのフィールド showUnitPrice。

skustring

ソースのフィールド sku。

taxableboolean

ソースのフィールド taxable。

tax_codestring

ソースのフィールド taxCode。

titlestring

ソースのフィールド title。

unit_pricejson

ソースのフィールド unitPrice。

unit_price_measurementjson

ソースのフィールド unitPriceMeasurement。

imagejson

ソースのフィールド image。

tender_transactions#

titan.shopify.tender_transactions には 7 個のソース列があります。

shopify.tender_transactions7列
idintegerpk

ソースのフィールド id。

order_idinteger

ソースのフィールド orderId。

amountjson

ソースのフィールド amount。

processed_atdatetime

ソースのフィールド processedAt。

payment_methodstring

ソースのフィールド paymentMethod。

remote_referencestring

ソースのフィールド remoteReference。

testboolean

ソースのフィールド test。

order_transactions#

titan.shopify.order_transactions には 22 個のソース列があります。

shopify.order_transactions22列
idintegerpk

ソースのフィールド id。

order_idinteger

ソースのフィールド orderId。

created_atdatetime

ソースのフィールド createdAt。

processed_atdatetime

ソースのフィールド processedAt。

amount_rounding_setjson

ソースのフィールド amountRoundingSet。

amount_setjson

ソースのフィールド amountSet。

currency_exchange_adjustmentjson

ソースのフィールド currencyExchangeAdjustment。

error_codestring

ソースのフィールド errorCode。

formatted_gatewaystring

ソースのフィールド formattedGateway。

gatewaystring

ソースのフィールド gateway。

kindstring

ソースのフィールド kind。

location_idinteger

ソースのフィールド locationId。

parent_transaction_idinteger

ソースのフィールド parentTransactionId。

payment_idstring

ソースのフィールド paymentId。

receipt_jsonjson

ソースのフィールド receiptJson。

settlement_currencystring

ソースのフィールド settlementCurrency。

settlement_currency_ratefloat

ソースのフィールド settlementCurrencyRate。

statusstring

ソースのフィールド status。

testboolean

ソースのフィールド test。

total_unsettled_setjson

ソースのフィールド totalUnsettledSet。

user_idinteger

ソースのフィールド userId。

amountfloat

ソースのフィールド amount。

fulfillments#

titan.shopify.fulfillments には 16 個のソース列があります。

shopify.fulfillments16列
idintegerpk

ソースのフィールド id。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

delivered_atdatetime

ソースのフィールド deliveredAt。

display_statusstring

ソースのフィールド displayStatus。

estimated_delivery_atdatetime

ソースのフィールド estimatedDeliveryAt。

in_transit_atdatetime

ソースのフィールド inTransitAt。

legacy_resource_idinteger

ソースのフィールド legacyResourceId。

location_idinteger

ソースのフィールド locationId。

order_idinteger

ソースのフィールド orderId。

namestring

ソースのフィールド name。

requires_shippingboolean

ソースのフィールド requiresShipping。

servicejson

ソースのフィールド service。

statusstring

ソースのフィールド status。

total_quantityinteger

ソースのフィールド totalQuantity。

tracking_infojson

ソースのフィールド trackingInfo。

metafields#

titan.shopify.metafields には 11 個のソース列があります。

shopify.metafields11列
idintegerpk

ソースのフィールド id。

created_atdatetime

ソースのフィールド createdAt。

updated_atdatetime

ソースのフィールド updatedAt。

typestring

ソースのフィールド type。

keystring

ソースのフィールド key。

valuestring

ソースのフィールド value。

json_valuejson

ソースのフィールド jsonValue。

namespacestring

ソースのフィールド namespace。

owner_idinteger

ソースのフィールド ownerId。

owner_typestring

ソースのフィールド ownerType。

legacy_resource_idinteger

ソースのフィールド legacyResourceId。

staff_members#

titan.shopify.staff_members には 13 個のソース列があります。

shopify.staff_members13列
idintegerpk

ソースのフィールド id。

account_typestring

ソースのフィールド accountType。

activeboolean

ソースのフィールド active。

avatarjson

ソースのフィールド avatar。

emailstring

ソースのフィールド email。

existsboolean

ソースのフィールド exists。

first_namestring

ソースのフィールド firstName。

last_namestring

ソースのフィールド lastName。

namestring

ソースのフィールド name。

initialsjson

ソースのフィールド initials。

is_shop_ownerboolean

ソースのフィールド isShopOwner。

localestring

ソースのフィールド locale。

phonestring

ソースのフィールド phone。

product_images#

titan.shopify.product_images には 6 個のソース列があります。

shopify.product_images6列
idintegerpk

ソースのフィールド id。

product_idinteger

ソースのフィールド productId。

urlstring

ソースのフィールド url。

widthinteger

ソースのフィールド width。

heightinteger

ソースのフィールド height。

alt_textstring

ソースのフィールド altText。

削除と履歴#

行はソースのキーでマージされます。ソース側で行の削除を確認できた場合、Supernova は行を残して _deleted を設定します。クエリで履歴を含めるかどうかを選べます。現在の状態だけを取得するには where not _deleted で絞り込んでください。