Comments (8)
Some column values are dumped in hex format. What is the type of column which is not displayed correctly. Also you can set debug = 1 in sstable.py to enable detailed logging. If still you are having issues, please share me sample SSTable if it is OK.
from ctools.
I am getting Datetime value to be like this 2016-05-20 12\\:21+0530
where as in cqlsh it shows like this 2016-05-20 12:22:42+0530
. Also one more value of cell is coming out to be like this 73746f636b69643d3233337c6369747969643d317c70663d327c656e7649643d31
where as in cqlsh it is like this key1=1334|key2=1|key3=2|key4=1
. Could it be due to my value contain | (pipe) and = (equal) operator
from ctools.
I will look in to the Datetime column value decoding. The other cell output is in hex format to comply with sstable2json format. You can convert it to binary by decoding hex data. You can use Python binascii module.
$ python -c "import binascii; print binascii.unhexlify("73746f636b69643d3233337c6369747969643d317c70663d327c656e7649643d31")"
stockid=233|cityid=1|pf=2|envId=1
from ctools.
I reviewed the Datetime column value. Cassandra uses character ':' to identify the clustering key. If your CQL table schema consists of compound primary key, then the clustering key is appended with character ':' . You can check the internal storage structure using cassandra-cli LIST command. In this case the character ':' in Datetime value is escaped with character ''. So in the json output you see these escape characters
from ctools.
Clustering key and integers are not handled in your code properly. While converting it in json it gives the garbage values. Kindly just review it once. I have checked cluster key buffer contains the size of nextkey then value after that seperator value which is :
again size of next key and repeat the same process. But in your code it is not handled properly.
from ctools.
I will change the code to identify the column name type and print based on it
from ctools.
I modified sstable2json.py to take additional argument to specify composite type. For example if your column name is compounded using date and utf8 string please specify the argument as TimestampType,UTF8Type.
This is a stand alone tool and it does't have access to the CQL table schema. So you need to pass the compound column types to the script. Currently it can decode only TimestampType and UTF8Type. I will add the support for other types soon.
from ctools.
Modified to use CQL type names timestamp, varchar and text. Please specify the argument as a comma separated list of CQL types. Currently only timestamp, varchar and text are supported.
from ctools.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctools.