Generating Schema

Schemas for BigQuery tables, views, and SELECT statements can be generated automatically by using the Generate option in the Schema design step. When the schema is automatically generated for a table or view, the schema name that the UI suggests is in the format dataset_table where the dataset and table identify the table (or view) for which the schema is generated.

The following table shows how BigQuery data types are mapped to the Design Server data types:

Table 1. Table for Generating Schema
BigQuery data type Design Server data type
INT64 Number, Interpretation: Character, Presentation: Integer
STRING Text, Interpretation: Character
NUMERIC, BIGNUMERIC Number, Interpretation: Character, Presentation: Decimal
BIGNUMERIC Number, Interpretation: Character, Presentation: Decimal
DATE Date & Time, Interpretation: Character, Format: {CCYY-MM-DD}
TIME Date & Time, Interpretation: Character, Format: {HH24:MM:SS[.1-6]}
DATETIME, TIMESTAMP Date & Time, Interpretation: Character, Format: {CCYY-MM-DD} {HH24:MM:SS[.1-6]}
BOOL, Bool Format: Digits Number, Interpretation: Character ( 0 or 1 )
BOOL, Bool Format:Text Text, Interpretation: Character ( 'true' or 'false' )
FLOAT64, Float64 Format: Binary Number, Interpretation: Binary, Presentation: Float
FLOAT64, Float64 Format: Text Number, Interpretation: Character, Presentation: Decimal
FLOAT64, Float64 Format: Base64 Text, Interpretation: Character
BYTES, Bytes Format: Binary Text, Interpretation: Binary
BYTES, Bytes Format: Text Text, Interpretation: Character
BYTES, Bytes Format: Base64 Text, Interpretation: Character
All other Text, Interpretation: Character

Where applicable, the Length, Precision, and Scale attributes are captured from the BigQuery schema fields and set in the corresponding Design Server schema fields.