Flink's Table API provides various operators as part of its domain-specific language. Most of the operators are available in Java and Scala APIs. Let's look at those operators one by one.
The select
operator is like a SQL select operator which allows you to select various attributes/columns in a table.
In Java:
Table result = in.select("id, name"); Table result = in.select("*");
In Scala:
val result = in.select('id, 'name); val result = in.select('*);
The where
operator is used for filtering out results.
In Java:
Table result = in.where("id = '101'");
In Scala:
val result = in.where('id == "101");
The filter
operator can be used as a replacement for the where
operator.
In Java:
Table result = in.filter("id = '101'");
In Scala:
val result = in.filter('id == "101");