SQLTransformer
SQLTransformer
implements the transformations which are defined by SQL statement. Currently, support SQL syntax like
SQLTransformer implements the transformations which are defined by SQL statement. Currently, we only support SQL syntax like "SELECT ... FROM __
THIS__
..." where "__
THIS__
" represents the underlying table of the input dataset. The select clause specifies the fields, constants, and expressions to display in the output, and can be any select clause that Spark SQL supports. Users can also use Spark SQL built-in function and UDFs to operate on these selected columns. For example, SQLTransformer supports statements like:
Examples
Assume that we have the following DataFrame with columns id, v1 and v2:
Last updated