pyflink.table.table_environment.StreamTableEnvironment.create#
- static StreamTableEnvironment.create(stream_execution_environment: Optional[StreamExecutionEnvironment] = None, environment_settings: Optional[EnvironmentSettings] = None) StreamTableEnvironment[source]#
Creates a
StreamTableEnvironment.Example:
# create with StreamExecutionEnvironment. >>> env = StreamExecutionEnvironment.get_execution_environment() >>> table_env = StreamTableEnvironment.create(env) # create with StreamExecutionEnvironment and EnvironmentSettings. >>> configuration = Configuration() >>> configuration.set_string('execution.buffer-timeout', '1 min') >>> environment_settings = EnvironmentSettings \ ... .new_instance() \ ... .in_streaming_mode() \ ... .with_configuration(configuration) \ ... .build() >>> table_env = StreamTableEnvironment.create( ... env, environment_settings=environment_settings) # create with EnvironmentSettings. >>> table_env = StreamTableEnvironment.create(environment_settings=environment_settings)
- Parameters
stream_execution_environment – The
StreamExecutionEnvironmentof the TableEnvironment.environment_settings – The environment settings used to instantiate the TableEnvironment.
- Returns
The StreamTableEnvironment created from given StreamExecutionEnvironment and configuration.