目次
本記事について
本記事では、shopserveの連携データにおいて、オブジェクトや配列を含むJSON形式のデータをRDB形式のカラムに分割するための、以下の2つの加工テンプレートについて紹介しています。
※“JSON”とは、「JavaScript Object Notation」の略称で、データの交換形式のことです
詳細については「JSONとは」(外部サイト)をご参照ください。
❶ shopserveの連携データにおいて
オブジェクトを含むJSON形式のデータをカラムに分割
❷ shopserveの連携データにおいて
配列を含むJSON形式のデータをカラムに分割
それぞれの加工テンプレートの詳細や操作手順については、以下をご参照ください。
加工テンプレートを利用することができる連携ファイル
shopserveの連携データにおいて、オブジェクトや配列を含むJSON形式のデータをRDB形式のカラムに分割するための加工テンプレートを利用することができる連携ファイルは、以下の6つです。
● Products
● ProductOptions
● Customers
● PopularityRanking
● ProductReview
● Orders
なお『Orders』ファイルは、加工テンプレート「shopserveの連携データにおいてオブジェクトを含むJSON形式のデータをカラムに分割」を実施後、加工テンプレート「shopserveの連携データにおいて配列を含むJSON形式のデータをカラムに分割」を実施する必要があります。
それぞれの連携ファイルで加工テンプレートを実施した際に分割されるカラムと、加工後に作成されるカラムについては、以下をご参照ください。
※加工後に作成されるカラムのデータ型は、すべて「テキスト型」です
分割される
カラム |
加工後 | |
作成される
カラム |
キー | |
Stock | Stock_Management_Type | management_type |
Stock_Quantity | quantity | |
Stock_Items_In_Cart | items_in_cart |
分割される
カラム |
加工後 | |
作成される
カラム |
キー | |
Display_Type_Input | Display_Type_Input | price |
分割される
カラム |
加工後 | |
作成される
カラム |
キー | |
Member | Member_Account | account |
Member_Point_Balance | point_balance | |
Member_Expire | expire |
分割される
カラム |
加工後 | |
作成される
カラム |
キー | |
Basic | Basic_Purchaser_Name | purchaser_name |
Basic_Payment_Amount_Bundle_Discount | bundle_discount | |
Basic_Payment_Amount_Cumulative_Discount | cumulative_discount | |
Basic_Payment_Amount_Subtotal | subtotal | |
Basic_Payment_Amount_Noshi_Wrapping_Total | noshi_wrapping_total | |
Basic_Payment_Amount_Postage | postage | |
Basic_Payment_Amount_Postage_Notice | postage_notice | |
Basic_Payment_Amount_Commission | commission | |
Basic_Payment_Amount_Commission_Notice | commission_notice | |
Basic_Payment_Amount_Store_Pickup_Commission | store_pickup_commission | |
Basic_Payment_Amount_Adjust_Name | adjust_name | |
Basic_Payment_Amount_Adjust_Amount | adjust_amount | |
Basic_Payment_Amount_Rank_Name | rank_name | |
Basic_Payment_Amount_Rank_Discount_Price | rank_discount_price | |
Basic_Payment_Amount_Coupon_Name | coupon_name | |
Basic_Payment_Amount_Coupon_Discount_Price | coupon_discount_price | |
Basic_Payment_Amount_Used_Point | used_point | |
Basic_Payment_Amount_Total | total | |
Basic_Payment_Amount_Tax_Details | tax_details | |
Basic_Folders | folders | |
Basic_Payment_Method | payment_method | |
Basic_Payment_Status | payment_status | |
Basic_Contain_Point | contain_point | |
Basic_Point_Issue_Amount | issue_amount | |
Basic_Point_Expire | expire | |
Basic_Point_Status | status | |
Basic_Confirmed | confirmed | |
Basic_Confirmed_Date | confirmed_date | |
Basic_Paid | paid | |
Basic_Paid_Date | paid_date | |
Basic_Confirm_Mail | confirm_mail | |
Basic_Paid_Mail | paid_mail | |
Basic_Shipping_Mail | shipping_mail | |
Basic_Follow_Mail | follow_mail | |
Basic_illegal_status | illegal_status | |
Basic_Selling_Type | selling_type | |
Basic_Subscription_Application_Id | application_id | |
Basic_Subscription_Delivery_Number | delivery_number | |
Basic_Subscription_Discount_Name | discount_name | |
Basic_Subscription_Discount_Price | discount_price | |
Basic_Subscription_Discount_Price_Reason | discount_price_reason | |
Basic_Subscription_Present_Point_Reason | present_point_reason | |
Basic_Subscription_Present_Item_Reason | present_item_reason | |
Basic_Delivery_Type | delivery_type | |
Basic_Communication_Title | communication_title | |
Basic_Communication_Comment | communication_comment | |
Basic_Amazon_Reference_Id | amazon_reference_id | |
Basic_Review_Token | review_token | |
Purchaser | Purchaser_Corporation_Name | corporation_name |
Purchaser_Corporation_Name_Kana | corporation_name_kana | |
Purchaser_Division | division | |
Purchaser_Name | name | |
Purchaser_Name_Kana | name_kana | |
Purchaser_Zip | zip | |
Purchaser_Prefecture | prefecture | |
Purchaser_City | city | |
Purchaser_Town_And_Number | town_and_number | |
Purchaser_Building | building | |
Purchaser_Tel | tel | |
Purchaser_Fax | fax | |
Purchaser_Mail_Address | mail_address | |
Purchaser_Note_Title | note_title | |
Purchaser_Note_Comment | note_comment | |
Purchaser_Member_Account | member_account | |
Purchaser_Rank_Name | rank_name | |
Purchaser_Purchase_Count | purchase_count | |
Purchaser_Questionnaires | questionnaires | |
Purchaser_Is_Delivery_Address | is_delivery_address | |
Purchaser_User_Agent | user_agent | |
Purchaser_Memo | memo | |
Payment | Payment_Method | method |
Payment_Status | status | |
Payment_Special_Amazon_Pay_Reference_Id | reference_id | |
Payment_Special_Netprotections_Deferred_Id | id | |
Payment_Special_Netprotections_Deferred_Options | options | |
Payment_Special_Netprotections_Deferred_Invoice_Date | invoice_date |
分割される
カラム |
加工後 | |
作成される
カラム |
キー | |
Sales_Copy | Sales_Copy_Pc | pc |
Sales_Copy_Smart_Phone | smart_phone | |
Sales_Copy_Mobile_Phone | mobile_phone | |
Image | Image_Alt | alt |
Image_Url | url |
分割される
カラム |
加工後 | |
作成される
カラム |
キー | |
Image | Image_Alt | alt |
Image_Url | url |
JSON形式のデータは、『キー』と『値(value)』がセットで格納されています。
JSON形式のデータをカラムに分割する加工テンプレートを利用した場合、『キー』を区切りとしてカラムが分割され、作成されたカラムに『値』が格納されます。
例)
“{
“”management_type””: “”Item””,
“”quantity””: 191,
“”items_in_cart””: 3,
}”
上記の「Products」ファイルの場合、『management_type』と『Item』、『quantity』と『191』、『items_in_cart』と『3』がセットです。
また加工テンプレートを利用した場合、以下のようにカラムが作成され、『値』が格納されます。
※『キー』に対応する『値』が格納されていなかった場合、作成されたカラムには『空文字』が格納されます
Stock_Management_Type | Stock_Quantity | Stock_Items_In_Cart | |
1 | Item | 191 | 3 |
加工テンプレート「shopserveの連携データにおいてオブジェクトを含むJSON形式のデータをカラムに分割」を利用する
下記では、加工テンプレート「shopserveの連携データにおいてオブジェクトを含むJSON形式のデータをカラムに分割」を利用する手順を紹介します。
今回は、『Orders』ファイルで加工テンプレートを利用する場合を例に説明します。
「データパレット」をクリックします
「データを確認する」をクリックします
shopserveの「『Orders』ファイル」をクリックします
「加工する」をクリックします
「テンプレート」をクリックします
「追加」をクリックします
加工テンプレートの「shopserveの連携データにおいてオブジェクトを含むJSON形式のデータをカラムに分割」を選択し、「適用」をクリックします
「適用」をクリックします
「保存」をクリックします
任意の更新設定を選択し、「適用」をクリックします
「更新する」を選択した場合は、更に実行頻度と時間を設定の上「追加」を選択し、「適用」をクリックします
「任意の名前」を入力し、「保存」をクリックします
加工テンプレート「shopserveの連携データにおいて配列を含むJSON形式のデータをカラムに分割」を利用する
下記では、加工テンプレート「shopserveの連携データにおいて配列を含むJSON形式のデータをカラムに分割」を利用する手順を紹介します。
今回は、『Orders』ファイルで加工テンプレートを利用する場合を例に説明します。