Skip to content

Normalize and validate field name #6784

Description

@haphungw

BigQuery table column names allow characters that are invalid in protobuf field identifiers (e.g., hyphens user-id, spaces first name, numbers as first character 123col, or non-ascii characters).

  1. If a field name is not a valid proto identifier, generate a placeholder name (e.g., col_<base64>) and attach the Storage Write API field extension (google.cloud.bigquery.storage.v1.column_name) = "<original_name>".
  2. Return SchemaError::DuplicateFieldName if multiple fields in the same message share a name.
  3. Return SchemaError::EmptySchema if a TableSchema contains no fields.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions