Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8771349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:45:49+00:00 2026-06-13T17:45:49+00:00

From online document: A CQL 3 table’s primary key can have any number (1

  • 0

From online document:
A CQL 3 table’s primary key can have any number (1 or more) of component columns, but there must be at least one column which is not part of the primary key.

What is the reason for that?

I tried to insert a row only with the columns in the composite key in CQL. I can’t see it when I do SELECT

cqlsh:demo> CREATE TABLE DEMO ( 
user_id bigint,
    dep_id bigint,
    created timestamp,
    lastupdated timestamp,
    PRIMARY KEY (user_id, dep_id)
     );

cqlsh:demo> INSERT INTO DEMO (user_id, dep_id)
     ...   VALUES (100, 1);

cqlsh:demo> select * from demo;


 cqlsh:demo>

But when I use cli, it shows up something:

default@demo] list demo;
Using default limit of 100
Using default column limit of 100
-------------------
RowKey: 100

1 Row Returned.
Elapsed time: 27 msec(s).

But can’t see the values of the columns.

After I add the column which is not in the primary key, the value shows up in CQL

 cqlsh:demo> INSERT INTO DEMO (user_id, dep_id, created)
         ...   VALUES (100, 1, '7943-07-23');
  cqlsh:demo> select * from demo;
  user_id | dep_id | created                  | lastupdated
  ---------+--------+--------------------------+-------------
   100 |      1 | 7943-07-23 00:00:00+0000 |        null

Result from CLI:

 [default@demo] list demo;
 Using default limit of 100
 Using default column limit of 100
  -------------------
 RowKey: 100
 invalid UTF8 bytes 0000ab7240ab7580
 [default@demo]

Any idea?
update: I found the reason why CLI returns invalid UTF8 bytes 0000ab7240ab7580, it’s not compatible with the table created for from CQL3, if I use compact storage option, the value shows up correctly for CLI.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:45:50+00:00Added an answer on June 13, 2026 at 5:45 pm

    What’s really happening under the covers is that the non-key values are being saved using the primary key values which make up the row key and column names. If you don’t insert any non-key values then you’re not really creating any new column family columns. The row key comes from the first primary key, so that’s why Cassandra was able to create a new row for you, even though no columns were created with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this old question but no answer works for me from online, the
My list view is parsed from a online resource, but i cant get the
So i have just moved everything from my localhost to a new online server
I'm developing a program that scrapes content from various online archives, but am new
I'm looking for a way to populate a table view from one single document,
I have created (with help from other scripts found online) a slideshow script that
I'm reading data from a binary file. I have a document that lets me
From the online bar chart guide : qplot(factor(cyl), data=mtcars, geom=bar, fill=factor(gear)) How do I
So I know from various online sources that it is generally a no-no to
I am learning object orientated programming from the online Stanford courses there is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.