0

I have inserted the order with all the necessary fields into Cassandra using python (cassandra-driver==3.21.0). Table schema looks like this:

Columns datatype
-----------------------
name         text
phone        text
date         text
inserteddate text


Name = 'Bob'
Phone = '48562'
Date = '2023-02-24'
Inserteddate = '2023-02-15 05:30:00.0',
orderId = 'test'
Data = [Name,Phone,Date,Inserteddate,orderId]
query = "INSERT INTO  dev.orders (name,phone,date,inserteddate,orderid) VALUES (%s,%s,%s,%s,%s)"
session.execute(query,Data)

After completing the insertion I am checking aws cql editor to check if it was inserted properly with below command.

SELECT * FROM dev.orders where date ='2023-02-24' ALLOW FILTERING;

It is fetching the record with which I have inserted but the date column is showing as null.

Expected result in console: Results:

name   phone   date         inserteddate             orderid 
bob    48562   2023-02-24   2023-02-15 05:30:00.0    test

What I got from aws cql editor Results:

name   phone   date         inserteddate             orderid 
bob    48562   null         2023-02-15 05:30:00.0    test

But when checked using putty to fetch the record, I could see the original value for the date field. What could be the reason for it showing incorrect data when using cql editor? How to overcome this?

Aaron
  • 55,518
  • 11
  • 116
  • 132

0 Answers0