我正在查询执行以下命令的 cassandra 表:
select * from oap.purchase_events where clientNumber = '100'
该表包含一行 clientNumber 100 ,但是我收到此错误:
InvalidRequest: code=2200 [Invalid query] message="Undefined name clientnumber in where clause ('clientnumber = 100')"
表定义:
CREATE TABLE oap.purchase_events (
"parentId" text,
"childId" text,
"clientNumber" text,
cost double,
description text,
"eventDate" timestamp,
"logDate" timestamp,
message text,
"operationalChannel" text,
"productDuration" bigint,
"productId" text,
"transactionId" text,
volume double,
"volumeUnit" text,
PRIMARY KEY ("parentId", "childId")
) WITH CLUSTERING ORDER BY ("childId" ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE INDEX purchase_events_clientNumber_idx ON gestor.purchase_events ("clientNumber");
Run Code Online (Sandbox Code Playgroud)
有什么帮助吗?
只需用双引号将 clientNumber 括起来
例子 : select * from purchase_events where "clientNumber" = '100';
归档时间: |
|
查看次数: |
1589 次 |
最近记录: |