Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content: User Selections (wish-list, baskets, …)

Selection customers have made of products or other entities (all types, including pinning and thumbs up/down, …)

Overview

In this Data Type, you can define all the data about the user-selections (typically of products in a wishlist or a basket).

Example

In this example, we provide a simple attribute definition.

Expand
titlesee example in JSON

Here is the example for the first case above (make sure to format it in JSONL before loading to BigQuery: Newline delimited JSON : https://en.wikipedia.org/wiki/JSON_streaming).

Code Block
languagejson
{
  "id": "1234",
  "type": "wishlist",
  "creation": "2020-10-20 00:00:00",
  "persona_id": "82474",
  "products": [
    {
      "sku": "123",
      "value": 2
    },
    {
      "sku": "456",
      "value": 1
    },
    {
      "sku": "789",
      "value": 1
    }
  ],
  "creation_tm": "2020-10-20 00:00:00",
  "client_id": 1,
  "src_sys_id": 1
}

Properties

Field name

Type

Mode

Description

id

STRING

REQUIRED

the unique id of the user selection

type

STRING

REQUIRED

the type of user selection: 'basket', 'wishlist', 'compare', 'favorite', ...

creation

DATETIME

NULLABLE

the creation date time of the user selection

last_update

DATETIME

NULLABLE

the last update date time of the user selection

persona_type

STRING

NULLABLE

the persona type who created this user selection

persona_id

STRING

NULLABLE

the persona who created this user selection

products

RECORDPRODUCT

REPEATED

connections to products

products. type

STRING

NULLABLE

products. name

STRING

NULLABLE

products. product_line

STRING

NULLABLE

products. product_group

STRING

NULLABLE

products. sku

STRING

NULLABLE

productsvalue

NUMERIC

NULLABLE

products. creation

DATETIME

NULLABLE

products. last_update

DATETIME

NULLABLE

contents

RECORDCONTENT

REPEATED

relations to other contents

contents. type

STRING

NULLABLE

contents. name

STRING

NULLABLE

contents. content_type

STRING

NULLABLE

contents. content_id

STRING

NULLABLE

contents. value

NUMERIC

NULLABLE

contents. creation

DATETIME

NULLABLE

contentslast_updateDATETIME

NULLABLE

customers

RECORDCUSTOMER

REPEATED

relations to other customers

customers. type

STRING

NULLABLE

customers. name

STRING

NULLABLE

customers. persona_id

STRING

NULLABLE

customers. customer_id

STRING

NULLABLE

customers. value

NUMERIC

NULLABLE

customers. creation

DATETIME

NULLABLE

customers. last_update

DATETIME

NULLABLE

value

NUMERIC

REQUIRED

the ucg value (weighting) (e.g.: 0.0 - 5.0 for stars)

stores

STRING

REPEATED

the stores

title

RECORDLOCALIZED

REPEATED

the title of the user selection

title. language_code

STRING

REQUIRED

title. value

STRING

REQUIRED

attribute value

short_description

RECORDLOCALIZED

REPEATED

the short description of the product group

short_descriptionlanguage_code

STRING

REQUIRED

short_description. value

STRING

REQUIRED

description

RECORD

LOCALIZED

REPEATED

the description of the user selection

description. language_code

STRING

REQUIRED

description. value

STRING

REQUIREDattribute value

images

RECORDLIST

REPEATED

the images of the user selection

images. name

STRING

REQUIRED

images. path

RECORD

REPEATED

images.path. language_code

STRING

REQUIRED

images.path. value

STRING

REQUIRED

link

RECORDattribute value

link

LOCALIZED

REPEATED

the link of the user selection

link. language_code

STRING

REQUIRED

link. value

STRING

REQUIREDattribute value

tags

RECORDTAG

REPEATED

the tags of the product line , e.g.: [STRUCT('tag', 'hello world', [STRUCT('de', 'hello world')])]

tags. type

STRING

REQUIRED

tags. value

STRING

REQUIRED

tags. loc_values

RECORD

REPEATED

tags.loc_values. language_code

STRING

REQUIRED

tags.loc_values. value

STRING

REQUIRED

labels

RECORDLABEL

REPEATED

the labels of the user selectionproduct line, e.g.: [STRUCT('symbol', 'helpfuldelivery', 'very24h', [STRUCT('de', 'sehr hilfreich24-H Versand')])]

labels. type

STRING

REQUIRED

labels. name

STRING

REQUIRED

labels. value

STRING

REQUIRED

labels. loc_values

RECORD

REPEATED

labels.loc_values. language_code

STRING

REQUIRED

labels.loc_values. value

STRING

REQUIRED

status

BOOLEAN

NULLABLE

the ucg status

periods

RECORDPERIOD

REPEATED

information about the activity periods of the user selection

periods. start_datetime

RECORD

REPEATED

periods.start_datetime. language_code

STRING

REQUIRED

periods.start_datetime. value

DATETIME

REQUIRED

periods. end_datetime

RECORD

REPEATED

periods.end_datetime. language_code

STRING

REQUIRED

periods.end_datetime. value

DATETIME

REQUIREDugc

string_attributes

RECORDMAP

REPEATED

additional string (not localized) attributes of the user selection

string_attributes. type

STRING

NULLABLE

string_attributes. name

STRING

REQUIRED

string_attributes. values

STRING

REPEATED

product line
(MAP type: STRING)

localized_string_attributes

RECORDMAP

REPEATED

additional localized string attributes of the user selection

localized_string_attributes. type

STRING

NULLABLE

localized_string_attributes. name

STRING

REQUIRED

localized_string_attributes. values

RECORD

REPEATED

localized_string_attributes.values. language_code

STRING

REQUIRED

localized_string_attributes.values. value

STRING

REQUIRED


(MAP type: LOCALIZED in STRING)

 numeric_attributes

RECORDMAP

REPEATED

additional numeric (not localized) attributes of the user selection

numeric_attributes. type

STRING

NULLABLE

numeric_attributes. name

STRING

REQUIRED

numeric_attributes. values

NUMERIC

REPEATED
(MAP type: NUMERIC)

localized_numeric_attributes

RECORDMAP

REPEATED

additional localized numeric attributes of the user selection

localized_numeric_attributes. type

STRING

NULLABLE

localized_numeric_attributes. name

STRING

REQUIRED

localized_numeric_attributes. values

RECORD

REPEATED

localized_numeric_attributes.values. language_code

STRING

REQUIRED

localized_numeric_attributes.values. value

NUMERIC

REQUIRED
(MAP type: LOCALIZED in NUMERIC)

datetime_attributes

RECORDMAP

REPEATED

datetime_attributes. name

STRING

REQUIRED

datetime_attributes. values

DATETIME

REPEATED

additional datetime (not localized) attributes of the user selection

datetime_attributes. type

STRING

NULLABLE


(MAP type: DATETIME)

localized_datetime_attributes

RECORDMAP

REPEATED

additional localized datetime attributes of the user selection

localized_datetime_attributes. type

STRING

NULLABLE

localized_datetime_attributes. name

STRING

REQUIRED

localized_datetime_attributes. values

RECORD

REPEATED

localized_datetime_attributes.values. language_code

STRING

REQUIRED

localized_datetime_attributes.values. value

DATETIME

REQUIRED


(MAP type: LOCALIZED inDATETIME)

creation_tm

DATETIME

REQUIRED

technical field

client_id

INTEGER

REQUIRED

technical field

src_sys_id

INTEGER

REQUIRED

technical field

Resources

BigQuery JSON Schema

https://github.com/boxalino/data-integration-doc-schema/blob/master/doc/doc_user_selection.json

BigQuery DDL

https://github.com/boxalino/data-integration-doc-schema/blob/master/ddl/doc_user_selection.sql