Support
How can we help you today?

Using the BigQuery STRUCT data type

A STRUCT in Google BigQuery is a data type used to organize related fields. The STRUCT data type is used to define nested and repeated columns. A STRUCT is a container of ordered fields.

An example of a STRUCT in a CREATE TABLE statement:


CREATE TABLE address (
  id STRING,
  first_name STRING,
  last_name STRING,
  dob DATE,
  address
   STRUCT<
    status STRING,
    address STRING,
    city STRING,
    state STRING,
    zip STRING,
    numberOfYears STRING>
)

To define a STRUCT for an entity in DeZign for Databases, go to the Attributes tab in the Entity dialog and create a new attribute (for example "address"). Select data type STRUCT. Create another new attribute and name it with a reference to the STRUCT attribute. For example "address.status". Create another new attribute and name it with a reference to the STRUCT attribute. For example "address.city". etc etc