Skip to end of banner
Go to start of banner

doc_user

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Content: Users (customers)

Customers data

Overview

In this Data Type, you can define all the data about the customers.

Example

In this example, we provide a simple attribute definition.

 see 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).

tbd

Properties

Field name

Type

Mode

Description

persona_id

STRING

REQUIRED

persona_type

STRING

NULLABLE

internal_id

STRING

NULLABLE

external_id

STRING

NULLABLE

title

STRING

NULLABLE

prefix

STRING

NULLABLE

firstname

STRING

NULLABLE

middlename

STRING

NULLABLE

lastname

STRING

NULLABLE

suffix

STRING

NULLABLE

gender

STRING

NULLABLE

date_of_birth

DATETIME

NULLABLE

account_creation

DATETIME

NULLABLE

creation_label

STRING

NULLABLE

auto_group

STRING

NULLABLE

invoice_status

STRING

NULLABLE

status

STRING

NULLABLE

spouse_id

STRING

NULLABLE

children_ids

STRING

REPEATED

customer_groups

STRING

REPEATED

stores

STRING

REPEATED

websites

STRING

REPEATED

company

STRING

NULLABLE

vat

STRING

NULLABLE

vat_is_valid

BOOLEAN

NULLABLE

vat_request_id

STRING

NULLABLE

vat_request_date

DATETIME

NULLABLE

vat_request_success

BOOLEAN

NULLABLE

street

STRING

NULLABLE

additional_address_line

STRING

NULLABLE

city

STRING

NULLABLE

zipcode

STRING

NULLABLE

stateID

STRING

NULLABLE

department

STRING

NULLABLE

statename

STRING

NULLABLE

countryiso

STRING

NULLABLE

countryID

STRING

NULLABLE

phone

STRING

NULLABLE

email

STRING

NULLABLE

mobile_phone

STRING

NULLABLE

fax

STRING

NULLABLE

giftregistry_item_id

STRING

NULLABLE

string_attributes

RECORD

REPEATED

string_attributes. type

STRING

NULLABLE

string_attributes. name

STRING

REQUIRED

string_attributes. values

STRING

REPEATED

localized_string_attributes

RECORD

REPEATED

localized_string_attributes. type

STRING

NULLABLE

localized_string_attributes. name

STRING

REQUIRED

localized_string_attributes. values

RECORD

REPEATED

localized_string_attributes.values. language

STRING

REQUIRED

localized_string_attributes.values. value

STRING

REQUIRED

numeric_attributes

RECORD

REPEATED

numeric_attributes. type

STRING

NULLABLE

numeric_attributes. name

STRING

REQUIRED

numeric_attributes. values

NUMERIC

REPEATED

localized_numeric_attributes

RECORD

REPEATED

localized_numeric_attributes. type

STRING

NULLABLE

localized_numeric_attributes. name

STRING

REQUIRED

localized_numeric_attributes. values

RECORD

REPEATED

localized_numeric_attributes.values. language

STRING

REQUIRED

localized_numeric_attributes.values. value

NUMERIC

REQUIRED

datetime_attributes

RECORD

REPEATED

datetime_attributes. type

STRING

NULLABLE

datetime_attributes. name

STRING

REQUIRED

datetime_attributes. values

DATETIME

REPEATED

localized_datetime_attributes

RECORD

REPEATED

localized_datetime_attributes. type

STRING

NULLABLE

localized_datetime_attributes. name

STRING

REQUIRED

localized_datetime_attributes. values

RECORD

REPEATED

localized_datetime_attributes.values. language

STRING

REQUIRED

localized_datetime_attributes.values. value

DATETIME

REQUIRED

subscriptions

RECORD

REPEATED

subscriptions. type

STRING

NULLABLE

subscriptions. name

STRING

REQUIRED

subscriptions. status

INTEGER

REQUIRED

subscriptions. periods

RECORD

REPEATED

subscriptions.periods. start_datetime

RECORD

REPEATED

subscriptions.periods.start_datetime. language

STRING

REQUIRED

subscriptions.periods.start_datetime. value

DATETIME

REQUIRED

subscriptions.periods. end_datetime

RECORD

REPEATED

subscriptions.periods.end_datetime. language

STRING

REQUIRED

subscriptions.periods.end_datetime. value

DATETIME

REQUIRED

notifications

RECORD

REPEATED

voucher_states

STRING

NULLABLE

contacts

STRING

REQUIRED

creation_tm

DATETIME

REQUIRED

technical field

client_id

INTEGER

REQUIRED

technical field

src_sys_id

INTEGER

REQUIRED

technical field

Table structure

 BigQuery JSON Schema
[
      {
        "description": "the persona_id as referenced in other tables",
        "type": "STRING",
        "name": "persona_id",
        "mode": "REQUIRED"
      },
      {
        "type": "STRING",
        "name": "persona_type",
        "description": "the type of persona (user, guest, ...)"
      },
      {
        "type": "STRING",
        "name": "internal_id",
        "description": "an additional internal id (optional)"
      },
      {
        "type": "STRING",
        "name": "external_id",
        "description": "the external identifier of the user (can be the same as the internal identifier)"
      },
      {
        "type": "STRING",
        "name": "title"
      },
      {
        "type": "STRING",
        "name": "prefix"
      },
      {
        "type": "STRING",
        "name": "firstname"
      },
      {
        "type": "STRING",
        "name": "middlename"
      },
      {
        "type": "STRING",
        "name": "lastname"
      },
      {
        "type": "STRING",
        "name": "suffix"
      },
      {
        "type": "STRING",
        "name": "gender"
      },
      {
        "type": "DATETIME",
        "name": "date_of_birth"
      },
      {
        "type": "DATETIME",
        "name": "account_creation"
      },
      {
        "type": "STRING",
        "name": "creation_label"
      },
      {
        "type": "STRING",
        "name": "auto_group"
      },
      {
        "type": "STRING",
        "name": "invoice_status"
      },
      {
        "type": "STRING",
        "name": "status"
      },
      {
        "type": "STRING",
        "name": "spouse_id"
      },
      {
        "type": "STRING",
        "name": "children_ids",
        "mode": "REPEATED"
      },
      {
        "type": "STRING",
        "name": "customer_groups",
        "mode": "REPEATED"
      },
      {
        "description": "the stores",
        "type": "STRING",
        "name": "stores",
        "mode": "REPEATED"
      },
      {
        "description": "the stores",
        "type": "STRING",
        "name": "websites",
        "mode": "REPEATED"
      },
      {
        "type": "STRING",
        "name": "company"
      },
      {
        "type": "STRING",
        "name": "vat"
      },
      {
        "type": "BOOLEAN",
        "name": "vat_is_valid"
      },
      {
        "type": "STRING",
        "name": "vat_request_id"
      },
      {
        "type": "DATETIME",
        "name": "vat_request_date"
      },
      {
        "type": "BOOLEAN",
        "name": "vat_request_success"
      },
      {
        "type": "STRING",
        "name": "street"
      },
      {
        "type": "STRING",
        "name": "additional_address_line"
      },
      {
        "type": "STRING",
        "name": "city"
      },
      {
        "type": "STRING",
        "name": "zipcode"
      },
      {
        "type": "STRING",
        "name": "stateID"
      },
      {
        "type": "STRING",
        "name": "department"
      },
      {
        "type": "STRING",
        "name": "statename"
      },
      {
        "type": "STRING",
        "name": "countryiso"
      },
      {
        "type": "STRING",
        "name": "countryID"
      },
      {
        "type": "STRING",
        "name": "phone"
      },
      {
        "type": "STRING",
        "name": "email"
      },
      {
        "type": "STRING",
        "name": "mobile_phone"
      },
      {
        "type": "STRING",
        "name": "fax"
      },
      {
        "type": "STRING",
        "name": "giftregistry_item_id"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "type": "STRING",
            "name": "values",
            "mode": "REPEATED"
          }
        ],
        "description": "additional string (not localized) attributes of the voucher",
        "type": "RECORD",
        "name": "string_attributes",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "language",
                "mode": "REQUIRED"
              },
              {
                "type": "STRING",
                "name": "value",
                "mode": "REQUIRED"
              }
            ],
            "type": "RECORD",
            "name": "values",
            "mode": "REPEATED"
          }
        ],
        "description": "additional localized string attributes of the voucher",
        "type": "RECORD",
        "name": "localized_string_attributes",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "type": "NUMERIC",
            "name": "values",
            "mode": "REPEATED"
          }
        ],
        "description": "additional numeric (not localized) attributes of the voucher",
        "type": "RECORD",
        "name": "numeric_attributes",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "language",
                "mode": "REQUIRED"
              },
              {
                "type": "NUMERIC",
                "name": "value",
                "mode": "REQUIRED"
              }
            ],
            "type": "RECORD",
            "name": "values",
            "mode": "REPEATED"
          }
        ],
        "description": "additional localized numeric attributes of the voucher",
        "type": "RECORD",
        "name": "localized_numeric_attributes",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "type": "DATETIME",
            "name": "values",
            "mode": "REPEATED"
          }
        ],
        "description": "additional datetime (not localized) attributes of the voucher",
        "type": "RECORD",
        "name": "datetime_attributes",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "language",
                "mode": "REQUIRED"
              },
              {
                "type": "DATETIME",
                "name": "value",
                "mode": "REQUIRED"
              }
            ],
            "type": "RECORD",
            "name": "values",
            "mode": "REPEATED"
          }
        ],
        "description": "additional localized datetime attributes of the voucher",
        "type": "RECORD",
        "name": "localized_datetime_attributes",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "type": "INTEGER",
            "name": "status",
            "mode": "REQUIRED"
          },
          {
            "fields": [
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "DATETIME",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "start_datetime",
                "mode": "REPEATED"
              },
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "DATETIME",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "end_datetime",
                "mode": "REPEATED"
              }
            ],
            "type": "RECORD",
            "name": "periods",
            "mode": "REPEATED"
          }
        ],
        "description": "the state of the subscriptions (e-mails and others)",
        "type": "RECORD",
        "name": "subscriptions",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "type": "INTEGER",
            "name": "status",
            "mode": "REQUIRED"
          },
          {
            "fields": [
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "DATETIME",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "start_datetime",
                "mode": "REPEATED"
              },
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "DATETIME",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "end_datetime",
                "mode": "REPEATED"
              }
            ],
            "type": "RECORD",
            "name": "periods",
            "mode": "REPEATED"
          }
        ],
        "description": "the state of the notofications (e-mails and others)",
        "type": "RECORD",
        "name": "notifications",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "type": "STRING",
            "name": "type"
          },
          {
            "type": "STRING",
            "name": "name",
            "mode": "REQUIRED"
          },
          {
            "type": "INTEGER",
            "name": "status",
            "mode": "REQUIRED"
          },
          {
            "fields": [
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "DATETIME",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "start_datetime",
                "mode": "REPEATED"
              },
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "DATETIME",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "end_datetime",
                "mode": "REPEATED"
              }
            ],
            "type": "RECORD",
            "name": "periods",
            "mode": "REPEATED"
          }
        ],
        "description": "the state of the vouchers (used and others)",
        "type": "RECORD",
        "name": "voucher_states",
        "mode": "REPEATED"
      },
      {
        "fields": [
          {
            "description": "e.g.: billing, shipping",
            "type": "STRING",
            "name": "type",
            "mode": "REQUIRED"
          },
          {
            "type": "STRING",
            "name": "persona_id",
            "description": "the persona_id as referenced in other tables"
          },
          {
            "type": "STRING",
            "name": "persona_type",
            "description": "the type of persona (user, guest, ...)"
          },
          {
            "type": "STRING",
            "name": "internal_id",
            "description": "an additional internal id (optional)"
          },
          {
            "type": "STRING",
            "name": "external_id",
            "description": "the external identifier of the user (can be the same as the internal identifier)"
          },
          {
            "type": "STRING",
            "name": "title"
          },
          {
            "type": "STRING",
            "name": "prefix"
          },
          {
            "type": "STRING",
            "name": "firstname"
          },
          {
            "type": "STRING",
            "name": "middlename"
          },
          {
            "type": "STRING",
            "name": "lastname"
          },
          {
            "type": "STRING",
            "name": "suffix"
          },
          {
            "type": "STRING",
            "name": "gender"
          },
          {
            "type": "DATETIME",
            "name": "date_of_birth"
          },
          {
            "type": "DATETIME",
            "name": "account_creation"
          },
          {
            "type": "STRING",
            "name": "creation_label"
          },
          {
            "type": "STRING",
            "name": "auto_group"
          },
          {
            "type": "STRING",
            "name": "invoice_status"
          },
          {
            "type": "STRING",
            "name": "status"
          },
          {
            "type": "STRING",
            "name": "spouse_id"
          },
          {
            "type": "STRING",
            "name": "children_ids",
            "mode": "REPEATED"
          },
          {
            "type": "STRING",
            "name": "customer_groups",
            "mode": "REPEATED"
          },
          {
            "description": "the stores",
            "type": "STRING",
            "name": "stores",
            "mode": "REPEATED"
          },
          {
            "description": "the stores",
            "type": "STRING",
            "name": "websites",
            "mode": "REPEATED"
          },
          {
            "type": "STRING",
            "name": "company"
          },
          {
            "type": "STRING",
            "name": "vat"
          },
          {
            "type": "BOOLEAN",
            "name": "vat_is_valid"
          },
          {
            "type": "STRING",
            "name": "vat_request_id"
          },
          {
            "type": "DATETIME",
            "name": "vat_request_date"
          },
          {
            "type": "BOOLEAN",
            "name": "vat_request_success"
          },
          {
            "type": "STRING",
            "name": "street"
          },
          {
            "type": "STRING",
            "name": "additional_address_line"
          },
          {
            "type": "STRING",
            "name": "city"
          },
          {
            "type": "STRING",
            "name": "zipcode"
          },
          {
            "type": "STRING",
            "name": "stateID"
          },
          {
            "type": "STRING",
            "name": "department"
          },
          {
            "type": "STRING",
            "name": "statename"
          },
          {
            "type": "STRING",
            "name": "countryiso"
          },
          {
            "type": "STRING",
            "name": "countryID"
          },
          {
            "type": "STRING",
            "name": "phone"
          },
          {
            "type": "STRING",
            "name": "email"
          },
          {
            "type": "STRING",
            "name": "mobile_phone"
          },
          {
            "type": "STRING",
            "name": "fax"
          },
          {
            "type": "STRING",
            "name": "giftregistry_item_id"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "type": "STRING",
                "name": "values",
                "mode": "REPEATED"
              }
            ],
            "description": "additional string (not localized) attributes of the voucher",
            "type": "RECORD",
            "name": "string_attributes",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "STRING",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "values",
                "mode": "REPEATED"
              }
            ],
            "description": "additional localized string attributes of the voucher",
            "type": "RECORD",
            "name": "localized_string_attributes",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "type": "NUMERIC",
                "name": "values",
                "mode": "REPEATED"
              }
            ],
            "description": "additional numeric (not localized) attributes of the voucher",
            "type": "RECORD",
            "name": "numeric_attributes",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "NUMERIC",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "values",
                "mode": "REPEATED"
              }
            ],
            "description": "additional localized numeric attributes of the voucher",
            "type": "RECORD",
            "name": "localized_numeric_attributes",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "type": "DATETIME",
                "name": "values",
                "mode": "REPEATED"
              }
            ],
            "description": "additional datetime (not localized) attributes of the voucher",
            "type": "RECORD",
            "name": "datetime_attributes",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "fields": [
                  {
                    "type": "STRING",
                    "name": "language",
                    "mode": "REQUIRED"
                  },
                  {
                    "type": "DATETIME",
                    "name": "value",
                    "mode": "REQUIRED"
                  }
                ],
                "type": "RECORD",
                "name": "values",
                "mode": "REPEATED"
              }
            ],
            "description": "additional localized datetime attributes of the voucher",
            "type": "RECORD",
            "name": "localized_datetime_attributes",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "type": "INTEGER",
                "name": "status",
                "mode": "REQUIRED"
              },
              {
                "fields": [
                  {
                    "fields": [
                      {
                        "type": "STRING",
                        "name": "language",
                        "mode": "REQUIRED"
                      },
                      {
                        "type": "DATETIME",
                        "name": "value",
                        "mode": "REQUIRED"
                      }
                    ],
                    "type": "RECORD",
                    "name": "start_datetime",
                    "mode": "REPEATED"
                  },
                  {
                    "fields": [
                      {
                        "type": "STRING",
                        "name": "language",
                        "mode": "REQUIRED"
                      },
                      {
                        "type": "DATETIME",
                        "name": "value",
                        "mode": "REQUIRED"
                      }
                    ],
                    "type": "RECORD",
                    "name": "end_datetime",
                    "mode": "REPEATED"
                  }
                ],
                "type": "RECORD",
                "name": "periods",
                "mode": "REPEATED"
              }
            ],
            "description": "the state of the subscriptions (e-mails and others)",
            "type": "RECORD",
            "name": "subscriptions",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "type": "INTEGER",
                "name": "status",
                "mode": "REQUIRED"
              },
              {
                "fields": [
                  {
                    "fields": [
                      {
                        "type": "STRING",
                        "name": "language",
                        "mode": "REQUIRED"
                      },
                      {
                        "type": "DATETIME",
                        "name": "value",
                        "mode": "REQUIRED"
                      }
                    ],
                    "type": "RECORD",
                    "name": "start_datetime",
                    "mode": "REPEATED"
                  },
                  {
                    "fields": [
                      {
                        "type": "STRING",
                        "name": "language",
                        "mode": "REQUIRED"
                      },
                      {
                        "type": "DATETIME",
                        "name": "value",
                        "mode": "REQUIRED"
                      }
                    ],
                    "type": "RECORD",
                    "name": "end_datetime",
                    "mode": "REPEATED"
                  }
                ],
                "type": "RECORD",
                "name": "periods",
                "mode": "REPEATED"
              }
            ],
            "description": "the state of the notofications (e-mails and others)",
            "type": "RECORD",
            "name": "notifications",
            "mode": "REPEATED"
          },
          {
            "fields": [
              {
                "type": "STRING",
                "name": "type"
              },
              {
                "type": "STRING",
                "name": "name",
                "mode": "REQUIRED"
              },
              {
                "type": "INTEGER",
                "name": "status",
                "mode": "REQUIRED"
              },
              {
                "fields": [
                  {
                    "fields": [
                      {
                        "type": "STRING",
                        "name": "language",
                        "mode": "REQUIRED"
                      },
                      {
                        "type": "DATETIME",
                        "name": "value",
                        "mode": "REQUIRED"
                      }
                    ],
                    "type": "RECORD",
                    "name": "start_datetime",
                    "mode": "REPEATED"
                  },
                  {
                    "fields": [
                      {
                        "type": "STRING",
                        "name": "language",
                        "mode": "REQUIRED"
                      },
                      {
                        "type": "DATETIME",
                        "name": "value",
                        "mode": "REQUIRED"
                      }
                    ],
                    "type": "RECORD",
                    "name": "end_datetime",
                    "mode": "REPEATED"
                  }
                ],
                "type": "RECORD",
                "name": "periods",
                "mode": "REPEATED"
              }
            ],
            "description": "the state of the vouchers (used and others)",
            "type": "RECORD",
            "name": "voucher_states",
            "mode": "REPEATED"
          }
        ],
        "description": "billing/shipping and other contact information",
        "type": "RECORD",
        "name": "contacts",
        "mode": "REPEATED"
      },
      {
        "description": "technical field",
        "type": "DATETIME",
        "name": "creation_tm",
        "mode": "REQUIRED"
      },
      {
        "description": "technical field",
        "type": "INTEGER",
        "name": "client_id",
        "mode": "REQUIRED"
      },
      {
        "description": "technical field",
        "type": "INTEGER",
        "name": "src_sys_id",
        "mode": "REQUIRED"
      }
    ]
 BigQuery DDL
CREATE OR REPLACE TABLE `YOUR_PROJECT.YOUR_DATASET.doc_user_F_20201030`   (
	persona_id STRING NOT NULL OPTIONS(description="the persona_id as referenced in other tables")
	,persona_type STRING OPTIONS(description="the type of persona (user, guest, ...)")
	,internal_id STRING OPTIONS(description="an additional internal id (optional)")
	,external_id STRING OPTIONS(description="the external identifier of the user (can be the same as the internal identifier)")
	,title STRING
	,prefix STRING
	,firstname STRING
	,middlename STRING
	,lastname STRING
	,suffix STRING
	,gender STRING
	,date_of_birth DATETIME
	,account_creation DATETIME
	,creation_label STRING
	,auto_group STRING
	,invoice_status STRING
	,status STRING
	,spouse_id STRING
	,children_ids ARRAY<STRING NOT NULL>
	,customer_groups ARRAY<STRING NOT NULL>
	, stores ARRAY<STRING> OPTIONS(description="the stores")
	, websites ARRAY<STRING> OPTIONS(description="the stores")
	,company STRING
	,vat STRING
	,vat_is_valid BOOLEAN
	,vat_request_id STRING
	,vat_request_date DATETIME
	,vat_request_success BOOLEAN
	,street STRING
	,additional_address_line STRING
	,city STRING
	,zipcode STRING
	,stateID STRING
	,department STRING
	,statename STRING
	,countryiso STRING
	,countryID STRING
	,phone STRING
	,email STRING
	,mobile_phone STRING
	,fax STRING
	,giftregistry_item_id STRING
	,string_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRING NOT NULL>>> OPTIONS(description="additional string (not localized) attributes of the voucher")
	, localized_string_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRUCT<language STRING NOT NULL, value STRING NOT NULL>>>> OPTIONS(description="additional localized string attributes of the voucher")
	, numeric_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<NUMERIC NOT NULL>>> OPTIONS(description="additional numeric (not localized) attributes of the voucher")
	, localized_numeric_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRUCT<language STRING NOT NULL, value NUMERIC NOT NULL>>>> OPTIONS(description="additional localized numeric attributes of the voucher")
	, datetime_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<DATETIME NOT NULL>>> OPTIONS(description="additional datetime (not localized) attributes of the voucher")
	, localized_datetime_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>> OPTIONS(description="additional localized datetime attributes of the voucher")
	, subscriptions ARRAY<STRUCT<type STRING, name STRING NOT NULL, status INT64 NOT NULL, periods ARRAY<STRUCT<start_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>, end_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>>>> OPTIONS(description="the state of the subscriptions (e-mails and others)")
	, notifications ARRAY<STRUCT<type STRING, name STRING NOT NULL, status INT64 NOT NULL, periods ARRAY<STRUCT<start_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>, end_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>>>> OPTIONS(description="the state of the notofications (e-mails and others)")
	, voucher_states ARRAY<STRUCT<type STRING, name STRING NOT NULL, status INT64 NOT NULL, periods ARRAY<STRUCT<start_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>, end_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>>>> OPTIONS(description="the state of the vouchers (used and others)")
  , contacts ARRAY<STRUCT<
		type STRING NOT NULL OPTIONS(description="e.g.: billing, shipping")
		,persona_id STRING OPTIONS(description="the persona_id as referenced in other tables")
		,persona_type STRING OPTIONS(description="the type of persona (user, guest, ...)")
		,internal_id STRING OPTIONS(description="an additional internal id (optional)")
		,external_id STRING OPTIONS(description="the external identifier of the user (can be the same as the internal identifier)")
		,title STRING
		,prefix STRING
		,firstname STRING
		,middlename STRING
		,lastname STRING
		,suffix STRING
		,gender STRING
		,date_of_birth DATETIME
		,account_creation DATETIME
		,creation_label STRING
		,auto_group STRING
		,invoice_status STRING
		,status STRING
		,spouse_id STRING
		,children_ids ARRAY<STRING NOT NULL>
		,customer_groups ARRAY<STRING NOT NULL>
		, stores ARRAY<STRING> OPTIONS(description="the stores")
		, websites ARRAY<STRING> OPTIONS(description="the stores")
		,company STRING
		,vat STRING
		,vat_is_valid BOOLEAN
		,vat_request_id STRING
		,vat_request_date DATETIME
		,vat_request_success BOOLEAN
		,street STRING
		,additional_address_line STRING
		,city STRING
		,zipcode STRING
		,stateID STRING
		,department STRING
		,statename STRING
		,countryiso STRING
		,countryID STRING
		,phone STRING
		,email STRING
		,mobile_phone STRING
		,fax STRING
		,giftregistry_item_id STRING
		,string_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRING NOT NULL>>> OPTIONS(description="additional string (not localized) attributes of the voucher")
		, localized_string_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRUCT<language STRING NOT NULL, value STRING NOT NULL>>>> OPTIONS(description="additional localized string attributes of the voucher")
		, numeric_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<NUMERIC NOT NULL>>> OPTIONS(description="additional numeric (not localized) attributes of the voucher")
		, localized_numeric_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRUCT<language STRING NOT NULL, value NUMERIC NOT NULL>>>> OPTIONS(description="additional localized numeric attributes of the voucher")
		, datetime_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<DATETIME NOT NULL>>> OPTIONS(description="additional datetime (not localized) attributes of the voucher")
		, localized_datetime_attributes ARRAY<STRUCT<type STRING, name STRING NOT NULL, values ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>> OPTIONS(description="additional localized datetime attributes of the voucher")
		, subscriptions ARRAY<STRUCT<type STRING, name STRING NOT NULL, status INT64 NOT NULL, periods ARRAY<STRUCT<start_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>, end_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>>>> OPTIONS(description="the state of the subscriptions (e-mails and others)")
		, notifications ARRAY<STRUCT<type STRING, name STRING NOT NULL, status INT64 NOT NULL, periods ARRAY<STRUCT<start_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>, end_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>>>> OPTIONS(description="the state of the notofications (e-mails and others)")
		, voucher_states ARRAY<STRUCT<type STRING, name STRING NOT NULL, status INT64 NOT NULL, periods ARRAY<STRUCT<start_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>, end_datetime ARRAY<STRUCT<language STRING NOT NULL, value DATETIME NOT NULL>>>>>> OPTIONS(description="the state of the vouchers (used and others)")
	>> OPTIONS(description="billing/shipping and other contact information")
  , creation_tm   DATETIME NOT NULL OPTIONS(description="technical field")
  , client_id     INT64 NOT NULL OPTIONS(description="technical field")
  , src_sys_id    INT64 NOT NULL OPTIONS(description="technical field")
  )
OPTIONS(description="Document-oriented store of users (customers) data.");
  • No labels