类 SQLTransformer

  • 所有已实现的接口:
    Serializable, org.apache.flink.ml.api.AlgoOperator<SQLTransformer>, org.apache.flink.ml.api.Stage<SQLTransformer>, org.apache.flink.ml.api.Transformer<SQLTransformer>, SQLTransformerParams<SQLTransformer>, org.apache.flink.ml.param.WithParams<SQLTransformer>

    public class SQLTransformer
    extends Object
    implements org.apache.flink.ml.api.Transformer<SQLTransformer>, SQLTransformerParams<SQLTransformer>
    SQLTransformer implements the transformations that are defined by SQL statement.

    Currently we only support SQL syntax like `SELECT ... FROM __THIS__ ...` where `__THIS__` represents the input table and cannot be modified.

    The select clause specifies the fields, constants, and expressions to display in the output. Except the cases described in the note section below, it can be any select clause that Flink SQL supports. Users can also use Flink SQL built-in function and UDFs to operate on these selected columns.

    For example, SQLTransformer supports statements like:

    • `SELECT a, a + b AS a_b FROM __THIS__`
    • `SELECT a, SQRT(b) AS b_sqrt FROM __THIS__ where a > 5`
    • `SELECT a, b, SUM(c) AS c_sum FROM __THIS__ GROUP BY a, b`

    Note: This operator only generates append-only/insert-only table as its output. If the output table could possibly contain retract messages(e.g. perform `SELECT ... FROM __THIS__ GROUP BY ...` operation on a table in streaming mode), this operator would aggregate all changelogs and only output the final state.

    另请参阅:
    序列化表格
    • 构造器详细资料

      • SQLTransformer

        public SQLTransformer()
    • 方法详细资料

      • transform

        public org.apache.flink.table.api.Table[] transform​(org.apache.flink.table.api.Table... inputs)
        指定者:
        transform 在接口中 org.apache.flink.ml.api.AlgoOperator<SQLTransformer>
      • getParamMap

        public Map<org.apache.flink.ml.param.Param<?>,​Object> getParamMap()
        指定者:
        getParamMap 在接口中 org.apache.flink.ml.param.WithParams<SQLTransformer>