Hi all :wave: I'm trying to convert tables created...
# troubleshooting
r
Hi all πŸ‘‹ I'm trying to convert tables created using PyFlink table api into datastreams and running into some problems. Anyone aware of limitations in converting between table and datastream api? Specifically, converting a filesystem connector table like so:
Copy code
tab = t_env.from_path("input_table")
    ds = t_env.to_data_stream(tab)
    ds.print()
    env.execute()
results in
Copy code
py4j.protocol.Py4JError: An error occurred while calling o18.toDataStream. Trace:
org.apache.flink.api.python.shaded.py4j.Py4JException: Method toDataStream([class org.apache.flink.table.api.internal.TableImpl]) does not exist
βœ… 2
nvm, the issue was when creating the table environment,
StreamExecutionEnvironment
needs to be provided
Copy code
env = StreamExecutionEnvironment.get_execution_environment()
t_env = StreamTableEnvironment.create(env)
not
Copy code
t_env = StreamTableEnvironment.create(environment_settings=env_settings)