Support Questions
Find answers, ask questions, and share your expertise

PutSQL upsert failure for phoenix query server

Explorer

Hi,

I am trying to execute the following query from Nifi PutSQL processor:

upsert into avi.volumetric_baseline_stats (id, vid, bq, smp, men, dev, mn, mx, sb, lb, hb, cdate ) values ('0c5f056d-4ab9-4aff-85b6-be16a6d26fb2', '2c5f056d-4ab9-4aff-85b6-be16a6d26fb2', '3AM', 10, 35.94498150573111, 27.469655269627076, 14.988545494665143, 6.750156335486336, 37.23795073367189, 4.222558243311263, 3.4475017710537896, 1532056495)

Works fine if i exec it from PQS shell. But for PutSQL i see the an error:

ERROR [Timer-Driven Process Thread-7] o.apache.nifi.processors.standard.PutSQL PutSQL[id=dacee7f8-c481-38f3-9d2f-ac205671f9a3] Failed to update database for StandardFlowFileRecord[uuid=f093fe09-5845-457f-9ccb-63de3cc65d93,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1536343168431-292, container=default, section=292], offset=468153, length=7074],offset=565,name=3624901658251691,size=284] due to org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=VOLUMETRIC_BASELINE_STATS; it is possible that retrying the operation will succeed, so routing to retry: org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=VOLUMETRIC_BASELINE_STATSorg.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=VOLUMETRIC_BASELINE_STATSat org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:439)at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.<init>(FromCompiler.java:288)at org.apache.hoenix.compile.FromCompiler.getResolverForMutation(FromCompiler.java:252)at org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:286at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:536)at org.apache.phoenix.dbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:524)at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:304)at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:297)at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:295

at org.apache.phoenix.jdbc.PhoenixPreparedStatement.executeUpdate(PhoenixPreparedStatement.java:199)

at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)

at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)

at org.apache.nifi.processors.standard.PutSQL.lambda$null$11(PutSQL.java:388)

at org.apache.nifi.processor.util.pattern.ExceptionHandler.execute(ExceptionHandler.java:127)

at org.apache.nifi.processors.standard.PutSQL.lambda$new$12(PutSQL.java:382)

at org.apache.nifi.processor.util.pattern.PutGroup.putFlowFiles(PutGroup.java:94)

at org.apache.nifi.processor.util.pattern.Put.onTrigger(Put.java:101)

at org.apache.nifi.processors.standard.PutSQL.lambda$onTrigger$20(PutSQL.java:574)

at org.apache.nifi.processor.util.pattern.PartialFunctions.onTrigger(PartialFunctions.java:114)

at org.apache.nifi.processor.util.pattern.RollbackOnFailure.onTrigger(RollbackOnFailure.java:184)

at org.apache.nifi.processors.standard.PutSQL.onTrigger(PutSQL.java:574)

at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122)

at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)

at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)

at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

I tried to change table and column names name to upper case - no difference... Note that the table is in system catalog:

| | AVI | VOLUMETRIC_BASELINE_STATS | |

| | AVI | VOLUMETRIC_BASELINE_STATS | BQ |

| | AVI | VOLUMETRIC_BASELINE_STATS | CDATE |

| | AVI | VOLUMETRIC_BASELINE_STATS | DEV |

| | AVI | VOLUMETRIC_BASELINE_STATS | HB |

| | AVI | VOLUMETRIC_BASELINE_STATS | ID |

| | AVI | VOLUMETRIC_BASELINE_STATS | LB |

| | AVI | VOLUMETRIC_BASELINE_STATS | MEN |

| | AVI | VOLUMETRIC_BASELINE_STATS | MN |

| | AVI | VOLUMETRIC_BASELINE_STATS | MX |

| | AVI | VOLUMETRIC_BASELINE_STATS | SB |

| | AVI | VOLUMETRIC_BASELINE_STATS | SMP |

| | AVI | VOLUMETRIC_BASELINE_STATS | VID

I am stuck... Any idea what the problem may be?

Thank you