Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Default expression does not work #426

@huilingwei

Description

@huilingwei

Hi,

We create a table with multiple fields, and add bgUid field with default value: GENERATE_UUID(), when jsonWriter.appendRows, field bgUid is not included in json list. We assume one UUID should be generated as the default value, while the value we got is null.

After filter the field from TableMetadata, default values will take effect. This is not expected. It is expected that when one field is not defined, the default value will take effect. And that is also what the bigquery API do.

Code to filter field:

  const table = bigquery.dataset(datasetId).table(tableId);
  const [metadata] = (await table.getMetadata()) as [TableMetadata, unknown];
  const { schema } = metadata as { schema: Schema };
  schema.fields.filter(field=> field.name != 'bgUid');

Thanks,

Metadata

Metadata

Assignees

Labels

api: bigquerystorageIssues related to the googleapis/nodejs-bigquery-storage API.priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions