gfw.common.beam.pipeline.hooks.create_view_hook#

create_view_hook(table_config, mock=False)[source]#

Returns a hook function to create a view of a BigQuery table.

Parameters:
  • table_config (TableConfig) – TableConfig instance containing view details.

  • mock (bool) – If True, uses a mocked BQ client instead of performing real operations.

Returns:

A callable hook that accepts a Pipeline instance and creates the view.

Return type:

Callable[[Pipeline], None]