I'm using the DataStax Cassandra driver with NodeJS, and I would like to know if there's a way to get the new created object back after I add it to the DB?
I'm familiar with such an option in Mongo using Mongoose, but could not find an equivalent in Cassandra, does this mean I need to select it manually after I add it?
Related
I am using sparkSql to get data from postgresql but problem occurring whenever database connection lost due to some issues like (database client machine shutdown etc).
I wanted to make it re-connect automatically, how i can make it can you suggest me any way using sparkSql only
Note:- know this features are there in spring boot and hibernate but i am not considering this things
I use the community edition of Cassandra (not DSE). Earlier I used to use a tool called descanter. when I click "clone" in descanter on an existing table. it used to give me the CQL necessary to re-create the existing table.
Now on my new MacOS (High Sierra) the devcenter tool is broken. I searched on the forums and found that DataStax has no intention of maintaining the tool.
So I am now using the command line CQLSH. Now in CQLSH if I have an existing table. How to generate the query to clone an existing table?
I only need the table structure. I don't need any data.
I cannot physically login to the Cassandra server. So everything needs to be done by connecting to Cassandra remotely using CQLSH.
DESCRIBE command should help you
I have created an application from jhipster which is microservice based. I have gateway registry and application which is running on MySql database. Now I want to migrate from MySQL to Cassandra database. Can you please let me know the changes I need to make in java/class files and list of file. So far I made some changes like application-dev yml. I have this application on hibernate, ehcache etc. Changed the class name in cacheconfiguration.java. Please let me know anyother changes required to run on database.
Regards
Satyanvesh
You can use the same Java POJO classes to annotate with Spring-Cassandra or datastax Cassandra annotations. If you want to migrate your data as well export your data tables as csv from MySQL and use the COPY command in cql to copy from csv to Cassandra.
I am new to DSE graphs.
I have around 1000 records in a csv file, where each record has around 20 attributes, which I want to load in gremlin. All the records would form a separate vertex in the graph.
Is there a way to directly load all the records in one go. I found this link that used storage backend as DynamoDB but that link didn't help. I have my backend as DSE Cassandra.
I also tried populating the Cassandra DB with the records and then trying to form graph using this data but it didn't work.
Please let me know if there is way to do the required. Thanks in advance.
The DSE Graph Loader is a standalone tool can load CSV documents into DSE Graph. You would need to create a mapping script to use with the loader. You can find its documentation at https://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/graph/dgl/dglCSV.html
In Cassandra database the Table created in CQL is not seen in CLI in same column family is there any reference reason for the same ?
This is because two diffrent protocols are used to create the column family. You are creating the 'table' using the CQL binary protocol and then you are trying to edit it using the THRIFT interface (through CLI), this is not allowed on purpose. From the Cassandra CTO:
This is by design. CLI and Thrift-based consumers in general do not know how to understand CQL3 metadata, and would do the Wrong Thing without realizing it.
You can find the documented "issue" here.
If you wanted to access the data in the table you created you can use cqlsh.