How to get current timestamp with CQL while using Command Line?

You can use the timeuuid functions now() and dateof() (or in later versions of Cassandra, toTimestamp()), e.g., INSERT INTO TEST (ID, NAME, VALUE, LAST_MODIFIED_DATE) VALUES (‘2’, ‘elephant’, ‘SOME_VALUE’, dateof(now())); The now function takes no arguments and generates a new unique timeuuid (at the time where the statement using it is executed). The dateOf function takes … Read more

How to run shell script file using nodejs?

You could use “child process” module of nodejs to execute any shell commands or scripts with in nodejs. Let me show you with an example, I am running a shell script(hi.sh) with in nodejs. hi.sh echo “Hi There!” node_program.js const { exec } = require(‘child_process’); var yourscript = exec(‘sh hi.sh’, (error, stdout, stderr) => { … Read more

Cassandra: text vs varchar

text is just an alias for varchar! The documentation: Using cql3 – Datastax CQL commands – Datastax Documentation on Datatypes in CQL – Datastax CQL3 Documentation – Apache EDIT Here’s the link to the C* 1.2 docs. The text vs varchar info is still the same, however this document contains some extra datatypes. EDIT v2 … Read more

What should I choose: MongoDB/Cassandra/Redis/CouchDB? [closed]

Don’t let the spatial scale (1000+ devices) mislead you as to the computational and/or storage scale. A few dozen 35-byte inserts per second is a trivial workload for any mainstream DBMS, even running on low-end hardware. Likewise, 142 million records per month is only on the order of 1~10 gigabytes of storage per month, without … Read more

Why many refer to Cassandra as a Column oriented database?

If you take a look at the Readme file at Apache Cassandra git repo, it says that, Cassandra is a partitioned row store. Rows are organized into tables with a required primary key. Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)