class_docstr: Cloud BigQueryExampleGen component.
  
  The BigQuery examplegen component takes a query, and generates train
  and eval examples for downstream components.
  
  Component `outputs` contains:
   - `examples`: Channel of type `standard_artifacts.Examples` for output train
                 and eval examples.
docstr: Constructs a BigQueryExampleGen component.
  
  Args:
    query: BigQuery sql string, query result will be treated as a single
      split, can be overwritten by input_config.
    input_config: An example_gen_pb2.Input instance with Split.pattern as
      BigQuery sql string. If set, it overwrites the 'query' arg, and allows
      different queries per split. If any field is provided as a
      RuntimeParameter, input_config should be constructed as a dict with the
      same field names as Input proto message.
    output_config: An example_gen_pb2.Output instance, providing output
      configuration. If unset, default splits will be 'train' and 'eval' with
      size 2:1. If any field is provided as a RuntimeParameter, input_config
      should be constructed as a dict with the same field names as Output
      proto message.
    range_config: An optional range_config_pb2.RangeConfig instance,
      specifying the range of span values to consider.
    custom_executor_spec: Optional custom executor spec overriding the default
      executor spec specified in the component attribute.
    custom_config: An
      [example_gen_pb2.CustomConfig](https://github.com/tensorflow/tfx/blob/master/tfx/proto/example_gen.proto)
      instance, providing custom configuration for ExampleGen.
  
  Raises:
    RuntimeError: Only one of query and input_config should be set.
code: def __init__(
      self,
      query: Optional[str] = None,
      input_config: Optional[
          Union[example_gen_pb2.Input, data_types.RuntimeParameter]
      ] = None,
      output_config: Optional[
          Union[example_gen_pb2.Output, data_types.RuntimeParameter]
      ] = None,
      range_config: Optional[
          Union[
              range_config_pb2.RangeConfig,
              data_types.RuntimeParameter,
              ph.Placeholder,
          ]
      ] = None,
      custom_executor_spec: Optional[executor_spec.ExecutorSpec] = None,
      custom_config: Optional[
          Union[
              example_gen_pb2.CustomConfig, data_types.RuntimeParameter
          ]
      ] = None,
  ):
      """Constructs a BigQueryExampleGen component.
  
      Args:
        query: BigQuery sql string, query result will be treated as a single
          split, can be overwritten by input_config.
        input_config: An example_gen_pb2.Input instance with Split.pattern as
          BigQuery sql string. If set, it overwrites the 'query' arg, and allows
          different queries per split. If any field is provided as a
          RuntimeParameter, input_config should be constructed as a dict with the
          same field names as Input proto message.
        output_config: An example_gen_pb2.Output instance, providing output
          configuration. If unset, default splits will be 'train' and 'eval' with
          size 2:1. If any field is provided as a RuntimeParameter, input_config
          should be constructed as a dict with the same field names as Output
          proto message.
        range_config: An optional range_config_pb2.RangeConfig instance,
          specifying the range of span values to consider.
        custom_executor_spec: Optional custom executor spec overriding the default
          executor spec specified in the component attribute.
        custom_config: An
          [example_gen_pb2.CustomConfig](https://github.com/tensorflow/tfx/blob/master/tfx/proto/example_gen.proto)
          instance, providing custom configuration for ExampleGen.
  
      Raises:
        RuntimeError: Only one of query and input_config should be set.
      """
      if bool(query) == bool(input_config):
          raise RuntimeError(
              "Exactly one of query and input_config should be set."
          )
      input_config = input_config or utils.make_default_input_config(
          query
      )
      super().__init__(
          input_config=input_config,
          output_config=output_config,
          custom_config=custom_config,
          range_config=range_config,
          custom_executor_spec=custom_executor_spec,
      )
  
file_path: tfx/tfx/extensions/google_cloud_big_query/example_gen/component.py
imports: from typing import Optional, Union
  from tfx.components.example_gen import component
  from tfx.components.example_gen import utils
  from tfx.dsl.components.base import executor_spec
  from tfx.dsl.placeholder import placeholder
  from tfx.extensions.google_cloud_big_query.example_gen import executor
  from tfx.orchestration import data_types
  from tfx.proto import example_gen_pb2
  from tfx.proto import range_config_pb2
label_desc: Use image node_id 1 to create a new BigQueryExampleGen object from inherited base classes: component with example: obj = BigQueryExampleGen(query, input_config, output_config, range_config, custom_executor_spec, custom_config)