Column Family missing from system.schema_columns
Hi, I wanted to retrieve all the column families related to mykeyspace, so I ran the following query: SELECT columnfamily_name FROM system.schema_columns WHERE keyspace_name='mykeyspace'; I am missing two column family, I am not sure if this is the normal behavior or not? Are there any other way to get column families of a keyspace via CQL? But when I do from cqlsh terminal describe keyspace my keyspace; I retrieve all the column families. What am I missing? I am running a cassandra V1.2.1 Many Thanks, H
RE: Column Family missing from system.schema_columns
Hi, I am unable to run the COPY command in cassandra. Here is the ColumnFamily that I am using CREATE TABLE ap_perf_sample_data_tbl( ap_mac varchar, ap_proto int, stime int, ap_active_status int, bytes_from_dev int, bytes_to_dev int, location_id int, num_assocs int, num_data_pkts int, num_retry_pkts int, throughput_from_ap int, throughput_to_ap int, throughput_total_ap int, time_spent_on_channel int, time_util_by_ap int, PRIMARY KEY ((ap_mac, ap_proto), stime) I'm trying to use the COPY command in cqlsh as follows: cqlsh:performance_data> copy ap_perf_sample_data_tbl (ap_mac, ap_proto , stime, location_id, num_data_pkts, num_retry_pkts, num_assocs, time_util_by_ap, time_spent_on_channel, throughput_to_ap, throughput_from_ap, throughput_total_ap, bytes_to_dev, bytes_from_dev ,ap_active_status) from '/tmp/top'; Bad Request: Invalid STRING constant (1) for ap_proto of type int Aborting import at record #0 (line 1). Previously-inserted values still present. 0 rows imported in 0.008 seconds. cqlsh:performance_data> Contents of "/tmp/top" 00:00:01:00:01:00,1,1359532800,1,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 00:00:02:00:02:00,1,1359532800,2,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 00:00:03:00:03:00,1,1359532800,3,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 00:00:04:00:04:00,1,1359532800,4,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 Following is the version information. [root@localhost ~]# cqlsh Connected to Test Cluster at localhost:9160. [cqlsh 2.3.0 | Cassandra 1.2.2 | CQL spec 3.0.0 | Thrift protocol 19.35.0] Use HELP for help. Any clues as to why this may happen will be appreciated. Thanks Pushkar Prasad
COPY command not working
Hi, I am unable to run the COPY command in cassandra. Here is the ColumnFamily that I am using CREATE TABLE ap_perf_sample_data_tbl( ap_mac varchar, ap_proto int, stime int, ap_active_status int, bytes_from_dev int, bytes_to_dev int, location_id int, num_assocs int, num_data_pkts int, num_retry_pkts int, throughput_from_ap int, throughput_to_ap int, throughput_total_ap int, time_spent_on_channel int, time_util_by_ap int, PRIMARY KEY ((ap_mac, ap_proto), stime) I'm trying to use the COPY command in cqlsh as follows: cqlsh:performance_data> copy ap_perf_sample_data_tbl (ap_mac, ap_proto , stime, location_id, num_data_pkts, num_retry_pkts, num_assocs, time_util_by_ap, time_spent_on_channel, throughput_to_ap, throughput_from_ap, throughput_total_ap, bytes_to_dev, bytes_from_dev ,ap_active_status) from '/tmp/top'; Bad Request: Invalid STRING constant (1) for ap_proto of type int Aborting import at record #0 (line 1). Previously-inserted values still present. 0 rows imported in 0.008 seconds. cqlsh:performance_data> Contents of "/tmp/top" 00:00:01:00:01:00,1,1359532800,1,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 00:00:02:00:02:00,1,1359532800,2,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 00:00:03:00:03:00,1,1359532800,3,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 00:00:04:00:04:00,1,1359532800,4,6002166,312781,10,845100,9045000,259143,241 011,52835,186318,5413799,10 Following is the version information. [root@localhost ~]# cqlsh Connected to Test Cluster at localhost:9160. [cqlsh 2.3.0 | Cassandra 1.2.2 | CQL spec 3.0.0 | Thrift protocol 19.35.0] Use HELP for help. Any clues as to why this may happen will be appreciated. Thanks Pushkar Prasad
Re: Column Family missing from system.schema_columns
You are missing key_aliases and column_aliases from system.schema_columnfamies. -- AY On Friday, March 1, 2013 at 18:38 PM, Haithem Jarraya wrote: > Hi, > > I wanted to retrieve all the column families related to mykeyspace, so I > ran the following query: > > SELECT columnfamily_name FROM system.schema_columns WHERE > keyspace_name='mykeyspace'; > > I am missing two column family, I am not sure if this is the > normal behavior or not? > Are there any other way to get column families of a keyspace via CQL? > > But when I do from cqlsh terminal describe keyspace my keyspace; > I retrieve all the column families. What am I missing? > > I am running a cassandra V1.2.1 > > > Many Thanks, > > H
Re: COPY command not working
This is being caused by stricter validation in 1.2.2. I opened a ticket https://issues.apache.org/jira/browse/CASSANDRA-5305 - thanks for the report. -- AY On Friday, March 1, 2013 at 19:08 PM, Pushkar Prasad wrote: > Hi, > > I am unable to run the COPY command in cassandra. Here is the ColumnFamily > that I am using > > CREATE TABLE ap_perf_sample_data_tbl( > ap_mac varchar, > ap_proto int, > stime int, > ap_active_status int, > bytes_from_dev int, > bytes_to_dev int, > location_id int, > num_assocs int, > num_data_pkts int, > num_retry_pkts int, > throughput_from_ap int, > throughput_to_ap int, > throughput_total_ap int, > time_spent_on_channel int, > time_util_by_ap int, > PRIMARY KEY ((ap_mac, ap_proto), stime) > > I'm trying to use the COPY command in cqlsh as follows: > > cqlsh:performance_data> copy ap_perf_sample_data_tbl (ap_mac, ap_proto , > stime, location_id, num_data_pkts, num_retry_pkts, num_assocs, > time_util_by_ap, time_spent_on_channel, throughput_to_ap, > throughput_from_ap, throughput_total_ap, bytes_to_dev, bytes_from_dev > ,ap_active_status) from '/tmp/top'; > > Bad Request: Invalid STRING constant (1) for ap_proto of type int > Aborting import at record #0 (line 1). > Previously-inserted values still present. > 0 rows imported in 0.008 seconds. > cqlsh:performance_data> > > > Contents of "/tmp/top" > > 00:00:01:00:01:00,1,1359532800,1,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > 00:00:02:00:02:00,1,1359532800,2,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > 00:00:03:00:03:00,1,1359532800,3,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > 00:00:04:00:04:00,1,1359532800,4,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > > > Following is the version information. > > [root@localhost ~]# cqlsh Connected to Test Cluster at localhost:9160. > [cqlsh 2.3.0 | Cassandra 1.2.2 | CQL spec 3.0.0 | Thrift protocol 19.35.0] > Use HELP for help. > > > > Any clues as to why this may happen will be appreciated. > > Thanks > Pushkar Prasad > > >
Re: Column Family missing from system.schema_columns
thanks, it works like a charm. On 1 March 2013 17:37, Aleksey Yeschenko wrote: > You are missing key_aliases and column_aliases from > system.schema_columnfamies. > > -- > AY > > > On Friday, March 1, 2013 at 18:38 PM, Haithem Jarraya wrote: > > > Hi, > > > > I wanted to retrieve all the column families related to mykeyspace, so I > > ran the following query: > > > > SELECT columnfamily_name FROM system.schema_columns WHERE > > keyspace_name='mykeyspace'; > > > > I am missing two column family, I am not sure if this is the > > normal behavior or not? > > Are there any other way to get column families of a keyspace via CQL? > > > > But when I do from cqlsh terminal describe keyspace my keyspace; > > I retrieve all the column families. What am I missing? > > > > I am running a cassandra V1.2.1 > > > > > > Many Thanks, > > > > H > >
RE: COPY command not working
Aleksey, Thanks for the update. Can you tell me if there is any workaround for this? I want to use compound keys, and want to use COPY command. Thanks Pushkar -Original Message- From: Aleksey Yeschenko [mailto:alek...@yeschenko.com] Sent: 01 March 2013 23:12 To: dev@cassandra.apache.org Cc: Pushkar Prasad Subject: Re: COPY command not working This is being caused by stricter validation in 1.2.2. I opened a ticket https://issues.apache.org/jira/browse/CASSANDRA-5305 - thanks for the report. -- AY On Friday, March 1, 2013 at 19:08 PM, Pushkar Prasad wrote: > Hi, > > I am unable to run the COPY command in cassandra. Here is the ColumnFamily > that I am using > > CREATE TABLE ap_perf_sample_data_tbl( > ap_mac varchar, > ap_proto int, > stime int, > ap_active_status int, > bytes_from_dev int, > bytes_to_dev int, > location_id int, > num_assocs int, > num_data_pkts int, > num_retry_pkts int, > throughput_from_ap int, > throughput_to_ap int, > throughput_total_ap int, > time_spent_on_channel int, > time_util_by_ap int, > PRIMARY KEY ((ap_mac, ap_proto), stime) > > I'm trying to use the COPY command in cqlsh as follows: > > cqlsh:performance_data> copy ap_perf_sample_data_tbl (ap_mac, ap_proto , > stime, location_id, num_data_pkts, num_retry_pkts, num_assocs, > time_util_by_ap, time_spent_on_channel, throughput_to_ap, > throughput_from_ap, throughput_total_ap, bytes_to_dev, bytes_from_dev > ,ap_active_status) from '/tmp/top'; > > Bad Request: Invalid STRING constant (1) for ap_proto of type int > Aborting import at record #0 (line 1). > Previously-inserted values still present. > 0 rows imported in 0.008 seconds. > cqlsh:performance_data> > > > Contents of "/tmp/top" > > 00:00:01:00:01:00,1,1359532800,1,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > 00:00:02:00:02:00,1,1359532800,2,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > 00:00:03:00:03:00,1,1359532800,3,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > 00:00:04:00:04:00,1,1359532800,4,6002166,312781,10,845100,9045000,259143,241 > 011,52835,186318,5413799,10 > > > Following is the version information. > > [root@localhost ~]# cqlsh Connected to Test Cluster at localhost:9160. > [cqlsh 2.3.0 | Cassandra 1.2.2 | CQL spec 3.0.0 | Thrift protocol 19.35.0] > Use HELP for help. > > > > Any clues as to why this may happen will be appreciated. > > Thanks > Pushkar Prasad > > >