DB Row Filter / simple name filter

Hello,
Here is my Knime project :

image

I know I’ve one row in my DB with prenom = “X” but can’t filter it with DB Row Filter.

Here’s the error retrieved: ERROR DB Reader 0:76 Execute failed: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask

I’ve tried with db query, it works.

I’m a beginner with Knime.
So thanks in advance

Hi there @MaxenceO,

welcome to KNIME Community!

Seems to me error happens when reading data from Hive after filtering it. Can you execute DB Filter node then right click on it, choose Filtered DB Data option and click Cache no. of rows. What do you see, is it your row with prenom=“X”?

Br,
Ivan

thank you for your response
I got the same error : Error during fetching data from the database: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask " but if its works on DB Column Filter

Hi @MaxenceO,

can you try it without using flow variable? You are controlling the name of column and not it’s value. That is what you want?

Br,
Ivan

Hi @ipazin
What do you mean by “flow variable” ?
I ran the same operator on a line filter but with the data already retrieved and it works perfectly.

I want to retrieve all rows with value “x” in the first name column.

Thanks

Hi @MaxenceO,

you have created a flow variable type string with String Configuration node from you picture. Then in DB Row Filter node you used this flow variable to change column name based on which you filter. You can see this by message at the bottom:

The “name” parameter is controlled by a variable.

Did you want to do so or?

Br,
Ivan

Hi @ipazin
yes, I tried several ways to make my filter and during my researches I saw several solutions with String configuration.

I also tried with an other DB and it’s work ( without String configuration). But on my other DB, no.

Thanks

Hi @MaxenceO,

if you are not changing the column based on which you filter you don’t need to use flow variables. Can you try filtering you DB without it?

Br,
Ivan

Hi @ipazin
image
it’s worked… So it’s something with DB Row Filter but I tried a lot of thing…

Thanks

Hi @MaxenceO,

do you get same error in DB Reader node after you filter your data without using flow variable?

Br,
Ivan

1 Like

Hi @MaxenceO,

That’s a very generic error maybe the KNIME console knows more. You can increase the logging via File > Preferences > KNIME and File > Preferences > KNIME > KNIME GUI. Select DEBUG there, restart KNIME and rerun the nodes. Now have a look in the KNIME console if there are more informations about the problem.

Cheers
Sascha

1 Like

HI @ipazin & @sascha.wolke

Yes, I got the same error in DB Reader without flow variable.

I enabled debug mode but I don’t see anything relevant in the error.

"DEBUG ExecuteAction Creating execution job for 1 node(s)…
DEBUG NodeContainer DB Reader 0:76 has new state: CONFIGURED_MARKEDFOREXEC
DEBUG NodeContainer DB Reader 0:76 has new state: CONFIGURED_QUEUED
DEBUG NodeContainer KNIME_test 0 has new state: EXECUTING
DEBUG DB Reader 0:76 DB Reader 0:76 doBeforePreExecution
DEBUG DB Reader 0:76 DB Reader 0:76 has new state: PREEXECUTE
DEBUG NodeContainer ROOT has new state: EXECUTING
DEBUG DB Reader 0:76 Adding handler f5db5853-f511-4c12-9138-f7d0b09f67f3 (DB Reader 0:76: ) - 4 in total
DEBUG DB Reader 0:76 DB Reader 0:76 doBeforeExecution
DEBUG DB Reader 0:76 DB Reader 0:76 has new state: EXECUTING
DEBUG DB Reader 0:76 DB Reader 0:76 Start execute
DEBUG DB Reader 0:76 Preparing to read from database
DEBUG DB Reader 0:76 Acquiring connection.
DEBUG DB Reader 0:76 The small-scale transaction has been removed.
DEBUG DB Reader 0:76 All the statements have already been closed.
DEBUG DB Reader 0:76 The connection has been relinquished.
DEBUG DB Reader 0:76 The managed connection has been closed.
DEBUG DB Reader 0:76 The transaction managing connection has been closed.
DEBUG DB Reader 0:76 reset
ERROR DB Reader 0:76 Execute failed: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask
DEBUG DB Reader 0:76 DB Reader 0:76 doBeforePostExecution
DEBUG DB Reader 0:76 DB Reader 0:76 has new state: POSTEXECUTE
DEBUG DB Reader 0:76 DB Reader 0:76 doAfterExecute - failure
DEBUG DB Reader 0:76 reset
DEBUG DB Reader 0:76 clean output ports.
DEBUG DB Reader 0:76 Removing handler f5db5853-f511-4c12-9138-f7d0b09f67f3 (DB Reader 0:76: ) - 3 remaining
DEBUG DB Reader 0:76 DB Reader 0:76 has new state: IDLE
DEBUG DB Reader 0:76 Configure succeeded. (DB Reader)
DEBUG DB Reader 0:76 DB Reader 0:76 has new state: CONFIGURED
DEBUG DB Reader 0:76 KNIME_test 0 has new state: IDLE
DEBUG NodeContainer ROOT has new state: IDLE
DEBUG NodeTimer$GlobalNodeStats Successfully wrote node usage stats to file: C:\Users\DRXW6989\knime-workspace.metadata\knime\nodeusage_3.0.json
"

Thanks

Hi @MaxenceO,

do you have access to the YARN web UI of your cluster running the query? It’s reachable via http://your-master-node:8088 and contains more details about the Hive job.

Are you running the query on a real Cluster or test system / virtual machine with limited resources?

Cheers
Sascha