Database Query Node - error

The problem is the Data Base Query only uses the code and wraps a SELECT * FROM around it:

SELECT * FROM (<whatever your code is>)

so everything is a SELECT statement, table manipulations command would not work. Question is why you would not use the SQL executor to add the column? Everything will be executed on the cluster just like the Database nodes with the brown connections.

What you could do is just use a CAST command and create an empty variable. Question would again be what you would do with these empty variables, but you could create them :slight_smile:

SELECT * , CAST(NULL AS BIGINT) as new_number , CAST("" AS STRING) as new_string FROM #table#

kn_example_bigdata_hive_add_column.knwf (27.7 KB)

4 Likes