class_docstr: Hybrid source that switches underlying sources based on configured source chain.
  
  A simple example with FileSource and KafkaSource with fixed Kafka start position:
  
  ::
  
      >>> file_source = FileSource \
      ...      .for_record_stream_format(StreamFormat.text_line_format(), test_dir) \
      ...      .build()
      >>> kafka_source = KafkaSource \
      ...     .builder() \
      ...     .set_bootstrap_servers('localhost:9092') \
      ...     .set_group_id('MY_GROUP') \
      ...     .set_topics('quickstart-events') \
      ...     .set_value_only_deserializer(SimpleStringSchema()) \
      ...     .set_starting_offsets(KafkaOffsetsInitializer.earliest()) \
      ...     .build()
      >>> hybrid_source = HybridSource.builder(file_source).add_source(kafka_source).build()
class_docstr_tok: ["Hybrid","source","that","switches","underlying","sources","based","on","configured","source","chain",".","A","simple","example","with","FileSource","and","KafkaSource","with","fixed","Kafka","start","position",":",":",":",">",">",">","file_source","=","FileSource","\\","...",".for_record_stream_format","(","StreamFormat.text_line_format","(",")",",","test_dir",")","\\","...",".build","(",")",">",">",">","kafka_source","=","KafkaSource","\\","...",".builder","(",")","\\","...",".set_bootstrap_servers","(","'localhost:9092","'",")","\\","...",".set_group_id","(","'MY_GROUP","'",")","\\","...",".set_topics","(","'quickstart-events","'",")","\\","...",".set_value_only_deserializer","(","SimpleStringSchema","(",")",")","\\","...",".set_starting_offsets","(","KafkaOffsetsInitializer.earliest","(",")",")","\\","...",".build","(",")",">",">",">","hybrid_source","=","HybridSource.builder","(","file_source",")",".add_source","(","kafka_source",")",".build","(",")"]
code: def __init__(self, j_hybrid_source: JavaObject):
      super(HybridSource, self).__init__(j_hybrid_source)
  
file_path: flink/flink-python/pyflink/datastream/connectors/hybrid_source.py
imports: from py4j.java_gateway import JavaObject
  from pyflink.datastream.connectors import Source
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 1 to create a new HybridSource object from inherited base classes: Source with example: obj = HybridSource(j_hybrid_source)