apache/beam · warning

Native sinks no longer implemented; falling back to…

Error message

Native sinks no longer implemented; falling back to standard Beam sink.

What it means

`BigQuerySink` is a @deprecated alias (since 2.11.0) for WriteToBigQuery; calling it warns that native BigQuery sinks are no longer implemented and forwards to the standard Beam sink. Writes still work but use the standard implementation.

Solutions

  1. Replace `BigQuerySink(...)` with `WriteToBigQuery(...)`.
  2. Carry over the `validate` argument to WriteToBigQuery if needed.
  3. Temporarily filter the warning during a staged migration.

Example fix

// before
p | BigQuerySink('proj:ds.tbl', schema=..., write_disposition=...)
// after
p | WriteToBigQuery('proj:ds.tbl', schema=..., write_disposition=...)
Defensive patterns

Strategy: validation

Validate before calling

if sink_fn is BigQuerySink:
    raise TypeError('BigQuerySink is deprecated; use WriteToBigQuery')

Prevention

When it happens

Trigger: Instantiating `BigQuerySink(*args, validate=False, **kwargs)` in pipeline code.

Common situations: Very old Dataflow pipelines or examples still using BigQuerySink; upgrades where the class-based sink API was replaced by the WriteToBigQuery PTransform.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/e26d657599baf18e. Report an issue: GitHub.

Appendix: source

Thrown at sdks/python/apache_beam/io/gcp/bigquery.py:1452

    return self

  def __next__(self):
    try:
      return fastavro.schemaless_reader(self.bytes_reader, self.avro_schema)
    except (StopIteration, EOFError):
      self.read_rows_response = next(self.read_rows_iterator, None)
      if self.read_rows_response is not None:
        self.bytes_reader = io.BytesIO(
            self.read_rows_response.avro_rows.serialized_binary_rows)
        return fastavro.schemaless_reader(self.bytes_reader, self.avro_schema)
      else:
        raise StopIteration


@deprecated(since='2.11.0', current="WriteToBigQuery")
def BigQuerySink(*args, validate=False, **kwargs):
  """A deprecated alias for WriteToBigQuery."""
  warnings.warn(
      "Native sinks no longer implemented; "
      "falling back to standard Beam sink.")
  return WriteToBigQuery(*args, validate=validate, **kwargs)


_KNOWN_TABLES = set()


class BigQueryWriteFn(DoFn):
  """A ``DoFn`` that streams writes to BigQuery once the table is created."""

  DEFAULT_MAX_BUFFERED_ROWS = 2000
  DEFAULT_MAX_BATCH_SIZE = 500

  FAILED_ROWS = 'FailedRows'
  FAILED_ROWS_WITH_ERRORS = 'FailedRowsWithErrors'
  STREAMING_API_LOGGING_FREQUENCY_SEC = 300

View on GitHub (pinned to 12126d8942)