Hi,
I am trying to use a UserDefined Table Function to split up some data as follows: from pyflink.table.udf import udtf @udtf(input_types=DataTypes.STRING(), result_types= [DataTypes.STRING(), DataTypes.DOUBLE()]) However, I get the following error : py4j.protocol.Py4JJavaError: An error occurred while calling o5.executeSql. : org.apache.flink.table.api.ValidationException: SQL validation failed. From line 3, column 23 to line 3, column 33: No match found for function signature split(<CHARACTER>) I believe I am using the correct call to register the UDTF as per [1]. Am I missing something? Thanks, Manas |
Hi Manas, You need to join with the python udtf function. You can try the following sql: ddl_populate_temporary_table = f""" INSERT INTO {TEMPORARY_TABLE} SELECT * FROM ( SELECT monitorId, featureName, featureData, time_st FROM {INPUT_TABLE}, LATERAL TABLE(split(data)) as T(featureName, featureData)) t """ Best, Xingbo Manas Kale <[hidden email]> 于2020年7月15日周三 下午7:31写道:
|
Hi Xingbo, Thank you for the elaboration. Note that all of this is for a streaming job. I used this code to create a SQL VIEW : f""" and then tried executing a Tumbling window on it: f""" But I am getting this error: Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Column 'data' not found in any table I don't understand how it is expecting column "data" as I explicitly did not select that in the CREATE VIEW statement. Also, is it valid to use an SQL VIEW for a streaming job such as this? Regards, Manas On Wed, Jul 15, 2020 at 5:42 PM Xingbo Huang <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |