Разбор вложенного json в apache spark, который содержит поля struct, array -> struct и array - PullRequest
0 голосов
/ 23 октября 2019

Моя схема JSON содержит типы данных со Struct, Array, Struct и Array. Когда я сам разрываю это сообщение JSON, создавая несколько строк для продукта-столбца, который содержит функции (тип массива), у нас есть дочерние параметры семейства (структура) и значений (массив)

SampleData for JSON which have multiple orders


{"eventType":"ORDER_CREATED","data":{"code":"sit-10036010","market":"GBR","orderType":"pre-order","status":"CREATED","created":"2019-10-16T20:52:23+0000","lastModified":"2019-10-16T20:52:24+0000","channel":"Web","user":{"uid":"9ca66dae-7326-43b0-8b15-475c7a4e2e2f"},"payment":{"mode":"fordPay","info":{"type":"card","cardType":"MASTERCARD"}},"price":{"currencyIso":"GBP","value":600.0},"priceSummary":{"ACMRA_VS-KZ":600.0},"entries":[{"dealer":{"code":"GBR|42184|JA|F","name":"Gates of St Albans","address":{"town":"St Albans","line1":"105 Ashley Road","phone":"01727 226829","region":"Hertfordshire","postCode":"AL1 5DE","country":{"isocode":"GBR","name":"United Kingdom"}}},"product":{"catalogId":"WAEGB-CGW-2021-CX727BEVSUVGBR202100","imageUrl":"https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0","features":[{"family":{"code":"PAA"},"values":[{"code":"PN4HJ","description":"ICONIC SILVER"}]},{"family":{"code":"PowerTrain"},"values":[{"code":"DR--D_EN-C1_HTHAE_TR-WA","description":"MID BATTERY RWD"}]},{"family":{"code":"BS-"},"values":[{"code":"BS-SA","description":"5 DOOR SUV"}]},{"family":{"code":"TR-"},"values":[{"code":"TR-WA"}]},{"family":{"code":"MarketedSeries"},"values":[{"code":"ACMRA_VS-KZ","description":"MUSTANG MACH-E"}]}]}}]}}
{"eventType":"ORDER_AMENDED","data":{"code":"sit-10033004","market":"USA","orderType":"pre-order","status":"AMENDED","created":"2019-10-15T01:56:01+0000","lastModified":"2019-10-15T09:20:25+0000","channel":"InStore","user":{"uid":"6987a2b0-3551-4ec0-87d0-7d9e974bf212"},"payment":{"mode":"offline","info":{"type":"CHECK"}},"price":{"currencyIso":"USD","value":900.0},"priceSummary":{"feature2":100.0,"total":1900.0,"feature1":100.0},"entries":[{"dealer":{"code":"USA|06412|F24562|F","name":"Johnson Ford, Inc.","address":{"town":"Atmore","line1":"1828 S. Main Street","region":"AL","postCode":"36502","country":{"isocode":"USA","name":"United States"}}},"product":{"catalogId":"WANAB-CGW-2021-CX727","imageUrl":"https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WANAB-CGW-2021-CX727&featureConditions=000SJ%2CACMRJ_VS-LE&angleNo=21&viewType=exterior&width=0&height=0","features":[{"family":{"code":"000"},"values":[{"code":"000SJ","description":"Black Onyx"}]},{"family":{"code":"MarketedSeries"},"values":[{"code":"ACMRJ_VS-LE"}]}]}}]}}
{"eventType":"ORDER_CREATED","data":{"code":"sit-10032020","market":"USA","orderType":"pre-order","status":"CREATED","created":"2019-10-15T13:16:33+0000","lastModified":"2019-10-15T13:16:33+0000","channel":"InStore","user":{"uid":"eb22fa73-896d-38d2-843c-de9427339e04"},"payment":{"mode":"offline","info":{"type":"CHECK"}},"price":{"currencyIso":"USD","value":900.0},"priceSummary":{"feature2":100.0,"total":1900.0,"feature1":100.0},"entries":[{"dealer":{"code":"USA|06412|F24562|F","name":"Johnson Ford, Inc.","address":{"town":"Atmore","line1":"1828 S. Main Street","region":"AL","postCode":"36502","country":{"isocode":"USA","name":"United States"}}},"product":{"catalogId":"WANAB-CGW-2021-CX727","imageUrl":"https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WANAB-CGW-2021-CX727&featureConditions=000SJ%2CACMRJ_VS-LE%2CHTHAE&angleNo=21&viewType=exterior&width=0&height=0","features":[{"family":{"code":"HTH"},"values":[{"code":"HTHAE","description":"Standard Range High-Voltage Battery"}]},{"family":{"code":"000"},"values":[{"code":"000SJ","description":"Black Onyx"}]},{"family":{"code":"MarketedSeries"},"values":[{"code":"ACMRJ_VS-LE"}]}]}}]}}
{"eventType":"ORDER_CREATED","data":{"code":"sit-10033017","market":"USA","orderType":"pre-order","status":"CREATED","created":"2019-10-15T13:20:17+0000","lastModified":"2019-10-15T13:20:17+0000","channel":"InStore","user":{"uid":"1d501387-9b0c-3b43-bcb6-f50a7a90bc28"},"payment":{"mode":"offline","info":{"type":"CHECK"}},"price":{"currencyIso":"USD","value":900.0},"priceSummary":{"feature2":100.0,"total":1900.0,"feature1":100.0},"entries":[{"dealer":{"code":"USA|06412|F24562|F","name":"Johnson Ford, Inc.","address":{"town":"Atmore","line1":"1828 S. Main Street","region":"AL","postCode":"36502","country":{"isocode":"USA","name":"United States"}}},"product":{"catalogId":"WANAB-CGW-2021-CX727","imageUrl":"https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WANAB-CGW-2021-CX727&featureConditions=000SJ%2CACMRJ_VS-LE%2CHTHAE&angleNo=21&viewType=exterior&width=0&height=0","features":[{"family":{"code":"HTH"},"values":[{"code":"HTHAE","description":"Standard Range High-Voltage Battery"}]},{"family":{"code":"000"},"values":[{"code":"000SJ","description":"Black Onyx"}]},{"family":{"code":"MarketedSeries"},"values":[{"code":"ACMRJ_VS-LE"}]}]}}]}}

val data = spark.read.option ("multiLine", true) .json ("/ user / ykala / 20191023_JSON / *")

scala> data.printSchema
            root
             |-- data: struct (nullable = true)
             |    |-- channel: string (nullable = true)
             |    |-- code: string (nullable = true)
             |    |-- created: string (nullable = true)
             |    |-- entries: array (nullable = true)
             |    |    |-- element: struct (containsNull = true)
             |    |    |    |-- dealer: struct (nullable = true)
             |    |    |    |    |-- address: struct (nullable = true)
             |    |    |    |    |    |-- country: struct (nullable = true)
             |    |    |    |    |    |    |-- isocode: string (nullable = true)
             |    |    |    |    |    |    |-- name: string (nullable = true)
             |    |    |    |    |    |-- line1: string (nullable = true)
             |    |    |    |    |    |-- postCode: string (nullable = true)
             |    |    |    |    |    |-- region: string (nullable = true)
             |    |    |    |    |    |-- town: string (nullable = true)
             |    |    |    |    |-- code: string (nullable = true)
             |    |    |    |    |-- name: string (nullable = true)
             |    |    |    |-- product: struct (nullable = true)
             |    |    |    |    |-- catalogId: string (nullable = true)
             |    |    |    |    |-- features: array (nullable = true)
             |    |    |    |    |    |-- element: struct (containsNull = true)
             |    |    |    |    |    |    |-- family: struct (nullable = true)
             |    |    |    |    |    |    |    |-- code: string (nullable = true)
             |    |    |    |    |    |    |-- values: array (nullable = true)
             |    |    |    |    |    |    |    |-- element: struct (containsNull = true)
             |    |    |    |    |    |    |    |    |-- code: string (nullable = true)
             |    |    |    |    |    |    |    |    |-- description: string (nullable = true)
             |    |    |    |    |-- imageUrl: string (nullable = true)
             |    |-- lastModified: string (nullable = true)
             |    |-- market: string (nullable = true)
             |    |-- orderType: string (nullable = true)
             |    |-- payment: struct (nullable = true)
             |    |    |-- info: struct (nullable = true)
             |    |    |    |-- type: string (nullable = true)
             |    |    |-- mode: string (nullable = true)
             |    |-- price: struct (nullable = true)
             |    |    |-- currencyIso: string (nullable = true)
             |    |    |-- value: string (nullable = true)
             |    |-- status: string (nullable = true)
             |    |-- user: struct (nullable = true)
             |    |    |-- uid: string (nullable = true)
             |-- eventType: string (nullable = true)

, когда я разбираю столбец объектов с кодом семейства и значениями -> коды, описаниеон дает мне несколько строк, которые имеют различные функции

 val product = data.withColumn("Product_Features_data", explode($"data.entries.product.features")).withColumn("Product_imageUrl", explode(array($"data.entries.product.imageUrl"))).withColumn("Product_imageUrl_flat",explode($"Product_imageUrl"))      .withColumn("family_code",explode(array($"Product_Features_data.family.code"))).withColumn("family_code_flat",explode($"family_code"))       .withColumn("feature_flat", explode($"Product_Features_data"))       //.withColumn("feature_family_code",explode(array($"feature_flat.family.code"))) .withColumn("Values_Code", explode(array($"feature_flat.values.code")))       .withColumn("values_flat", explode($"Values_Code"))     .withColumn("value_description",explode(array($"feature_flat.values.description"))).withColumn("value_description_flat", explode($"value_description"))

Например: для этого order-sit-10032004 вы можете видеть, что есть несколько типов объектов, которые отображаются в нескольких строках.

eventType   cancellationReason  cancelled   channel code    created isocode_flat    CountryName_Flat    Line_Flat   Phone_flat  postCode_Flat   region_flat town_flat   DealerCode_flat PNA_Code    Sales_Code  Brand   DealerName_Falte    Product_CatalogID_flat  Product_imageUrl_flat   family_code_flat    values_flat value_description_flat  lastModified    market  orderType   payment_CardType    payment_type    payment_mode_flat   CurrencyISO PriceSummary_19_Silverforged    PriceSummary_AC-C29772E0    PriceSummary_ACMRA_VS-KX    PriceSummary_ACMRA_VS-KZ    PriceSummary_ACMRJ_VS-LE    Active Exhaust System   PriceSummary_BS-SA  PriceSummary_CeramicLeather PriceSummary_ClimateControlledSeats PriceSummary_ConfiguredOptions  PriceSummary_LargeRearSpoiler   PriceSummary_MagneRideAdaptiveSuspension    PriceSummary_DR--B_EN-C0_HTHAF_TR-WA    PriceSummary_DR--B_EN-C1_HTHAE_TR-WA    PriceSummary_DR--D_EN-C1_HTHAE_TR-WA    PriceSummary_J5XAB  PriceSummary_J5XAC  PriceSummary_PN4AG  PriceSummary_PN4HJ  PriceSummary_PN4HQ  feature1    feature2    test    total   status  user_uid
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PAA PN4HJ   ICONIC SILVER   2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PAA DR--D_EN-C1_HTHAE_TR-WA MID BATTERY RWD 2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PAA BS-SA   5 DOOR SUV  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PAA TR-WA       2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PAA ACMRA_VS-KZ MUSTANG MACH-E  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PowerTrain  PN4HJ   ICONIC SILVER   2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PowerTrain  DR--D_EN-C1_HTHAE_TR-WA MID BATTERY RWD 2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PowerTrain  BS-SA   5 DOOR SUV  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PowerTrain  TR-WA       2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PowerTrain  ACMRA_VS-KZ MUSTANG MACH-E  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   BS- PN4HJ   ICONIC SILVER   2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   BS- DR--D_EN-C1_HTHAE_TR-WA MID BATTERY RWD 2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   BS- BS-SA   5 DOOR SUV  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   BS- TR-WA       2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   BS- ACMRA_VS-KZ MUSTANG MACH-E  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   TR- PN4HJ   ICONIC SILVER   2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   TR- DR--D_EN-C1_HTHAE_TR-WA MID BATTERY RWD 2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   TR- BS-SA   5 DOOR SUV  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   TR- TR-WA       2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   TR- ACMRA_VS-KZ MUSTANG MACH-E  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   MarketedSeries  PN4HJ   ICONIC SILVER   2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   MarketedSeries  DR--D_EN-C1_HTHAE_TR-WA MID BATTERY RWD 2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   MarketedSeries  BS-SA   5 DOOR SUV  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   MarketedSeries  TR-WA       2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f
ORDER_CREATED           Web sit-10036010    2019-10-16T20:52:23+0000    GBR United Kingdom  105 Ashley Road 01727 226829    AL1 5DE Hertfordshire   St Albans   GBR 42184   JA  F   Gates of St Albans  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   MarketedSeries  ACMRA_VS-KZ MUSTANG MACH-E  2019-10-16T20:52:24+0000    GBR pre-order   MASTERCARD  card    fordPay GBP             600                                                                                 CREATED 9ca66dae-7326-43b0-8b15-475c7a4e2e2f

Фактический результат должен быть таким:

dealer_code dealer_name dealer_address_town dealer_address_line1    dealer_address_phone    dealer_address_region   dealer_address_postCode dealer_address_country_isocode  dealer_address_country_name product_catalogId   product_imageUrl    product_features_0_family_code  product_features_0_values_0_code    product_features_0_values_0_description product_features_1_family_code  product_features_1_values_0_code    product_features_1_values_0_description product_features_2_family_code  product_features_2_values_0_code    product_features_2_values_0_description product_features_3_family_code  product_features_3_values_0_code    product_features_4_family_code  product_features_4_values_0_code    product_features_4_values_0_description
    GBR|42184|JA|F  Gates of St Albans  St Albans   105 Ashley Road 01727 226829    Hertfordshire   AL1 5DE GBR United Kingdom  WAEGB-CGW-2021-CX727BEVSUVGBR202100 https://apigtwqa.ford.com/oneford/api/asset/composite?catalogID=WAEGB-CGW-2021-CX727BEVSUVGBR202100&featureConditions=ACMRA_VS-KZ%2CBS-SA%2CDR--D_EN-C1_HTHAE_TR-WA%2CPN4HJ%2CTR-WA&angleNo=21&viewType=exterior&width=0&height=0   PAA PN4HJ   ICONIC SILVER   PowerTrain  DR--D_EN-C1_HTHAE_TR-WA MID BATTERY RWD BS- BS-SA   5 DOOR SUV  TR- TR-WA   MarketedSeries  ACMRA_VS-KZ MUSTANG MACH-E
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...