Re: python Table API problem with pandas

2023-10-27 Thread Alexey Sergeev
# problem_3.py # call to .where() after .map() with pandas type function # also resets column names # and doesn't really filter values import pandas as pd t_env = TableEnvironment.create(EnvironmentSettings.in_streaming_mode()) table = t_env.from_elements( elements=[ (1, 'China'),

Re: python Table API problem with pandas

2023-10-27 Thread Alexey Sergeev
I'll copy the problems here if your prefer that. # problem_1.py # add_columns() resets column names to default names f0, f1, ..., fN t_env = TableEnvironment.create(EnvironmentSettings.in_streaming_mode()) table = t_env.from_elements( elements=[ (1, '{"name": "Flink"}'), (2,

Re: python Table API problem with pandas

2023-10-27 Thread Alexey Sergeev
# problem_2.py # .alias() does not work either import json t_env = TableEnvironment.create(EnvironmentSettings.in_streaming_mode()) table = t_env.from_elements( elements=[ (1, '{"name": "Flink"}'), (2, '{"name": "hello"}'), (3, '{"name": "world"}'), (4, '{"na