what's the new version of createTemporaryView?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

what's the new version of createTemporaryView?

大森林


my code is:

tEnv.createTemporaryView("orderA", orderA, "user,product,amount");

I got the hint:

createTemporaryView is deprecated


Then,what's the newest function to achieve above effect?

Thanks for your help
Reply | Threaded
Open this post in threaded view
|

Re: what's the new version of createTemporaryView?

Andrey Zagrebin-5
Hi,

if you check JavaDocs of the deprecated 'createTemporaryView',
it suggests to use another overloaded method:
<T> void createTemporaryView(String path, DataStream<T> dataStream, Expression... fields);

I suppose it should be then:
tEnv.createTemporaryView("orderA", orderA, $("user,product,amount"));

Best,
Andrey

On Tue, Oct 20, 2020 at 1:38 PM 大森林 <[hidden email]> wrote:


my code is:

tEnv.createTemporaryView("orderA", orderA, "user,product,amount");

I got the hint:

createTemporaryView is deprecated


Then,what's the newest function to achieve above effect?

Thanks for your help