Cassandra quoted columns

asked 2020-03-29 10:23:41 -0500

Hello,

I'm using Cassandra stage as Destination, with the lib "streamsets-datacollector-cassandra_3-lib"

How can I use quoted column names in the 'Field to Column Mapping' ?

Ex: in my Cassandra schema, I have the following column:

"basisOfRecord" text

In StreamSets / Cassandra / Field to Column Mapping, I've tried:

  1. "basisOfRecord"

The validation is failing:

CASSANDRA_08 - Invalid column mappings specified. Table doesn't have columns: "basisOfRecord" : columnNames
  1. basisOfRecord

The validation is OK

But then, the execution is failing, with the following stacks.

Please note that my column name has been converted to lowercase...

com.google.common.util.concurrent.UncheckedExecutionException: com.datastax.driver.core.exceptions.InvalidQueryException: Undefined column name basisofrecord
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2207)
    at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
    at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4881)
    at com.streamsets.pipeline.stage.destination.cassandra.CassandraTarget.recordToBoundStatement(CassandraTarget.java:429)
    at com.streamsets.pipeline.stage.destination.cassandra.CassandraTarget.writeBatchInsert(CassandraTarget.java:369)
    at com.streamsets.pipeline.stage.destination.cassandra.CassandraTarget.write(CassandraTarget.java:307)
    at com.streamsets.pipeline.api.base.configurablestage.DTarget.write(DTarget.java:34)
    at com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(StageRuntime.java:303)
    at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:244)
    at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:311)
    at com.streamsets.datacollector.runner.StagePipe.process(StagePipe.java:220)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.processPipe(ProductionPipelineRunner.java:854)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.lambda$executeRunner$3(ProductionPipelineRunner.java:898)
    at com.streamsets.datacollector.runner.PipeRunner.acceptConsumer(PipeRunner.java:221)
    at com.streamsets.datacollector.runner.PipeRunner.executeBatch(PipeRunner.java:142)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.executeRunner(ProductionPipelineRunner.java:897)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runSourceLessBatch(ProductionPipelineRunner.java:875)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.processBatch(ProductionPipelineRunner.java:505)
    at com.streamsets.datacollector.runner.StageRuntime$3.run(StageRuntime.java:383)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.streamsets.datacollector.runner.StageRuntime.processBatch(StageRuntime.java:379)
    at com.streamsets.datacollector.runner.StageContext.processBatch(StageContext.java:290)
    at com.streamsets.pipeline.lib.dirspooler.SpoolDirRunnable.produce(SpoolDirRunnable.java:327)
    at com.streamsets.pipeline.lib.dirspooler.SpoolDirRunnable.run(SpoolDirRunnable.java:148)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeRunnable.run(SafeScheduledExecutorService.java:188)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at com.streamsets ...
(more)
edit retag flag offensive close merge delete