How to become a Data Scientist

Published on

The Life of a Data Scientist Data scientists are big data wranglers. They take an enormous mass of messy data points (unstructured and structured) and use their formidable skills in math, statistics and programming to clean, massage and organize them. Then they apply all their analytic powers – industry knowledge, contextual understanding, skepticism of existing … Continue reading How to become a Data Scientist

How can I use Elasticsearch with MongoDB

Published on

Here how to do this on mongodb 3.0. Install mongodb. Create data directories: $ mkdir RANDOM_PATH/node1 $ mkdir RANDOM_PATH/node2> $ mkdir RANDOM_PATH/node3 Start Mongod instances $ mongod –replSet test –port 27021 –dbpath node1 $ mongod –replSet test –port 27022 –dbpath node2 $ mongod –replSet test –port 27023 –dbpath node3 Configure the Replica Set: $ mongo … Continue reading How can I use Elasticsearch with MongoDB

Unable to load native-hadoop library for your platform in hadoop

Published on

You’re running Hadoop on 64bit CentOS. The reason you saw that warning is the native Hadoop library $HADOOP_HOME/lib/native/libhadoop.so.1.0.0 was actually compiled on 32 bit. Anyway, it’s just a warning, and won’t impact Hadoop’s functionalities. Here is the way if you do want to eliminate this warning, download the source code of Hadoop and recompile libhadoop.so.1.0.0 … Continue reading Unable to load native-hadoop library for your platform in hadoop

error validating settings: only one positional argument is allowed in mongodb

Published on

If you get this error while inserting fields with –fields, the probable reason might be you are using spaces to do that. Both -f and –fields should work in those cases Using Mongo Version 3.0.6 mongoimport –db logs –collection action_logs –type tsv -f updated_at ,transaction_time ,origin –file parsed.tsv mongoimport –db logs –collection action_logs –type tsv … Continue reading error validating settings: only one positional argument is allowed in mongodb

How to run or execute mongo commands using shell scripts

Published on

You can also evaluate a command using the –eval flag, if it is just a single command. mongo –eval “printjson(db.serverStatus())” Please note: if you are using Mongo operators, starting with a $ sign, you’ll want to surround the eval argument in single quotes to keep the shell from evaluating the operator as an environment variable: … Continue reading How to run or execute mongo commands using shell scripts

How do I drop a MongoDB database from the command line?

Published on

The best way is to do it is from the mongodb console: > use mydb; > db.dropDatabase(); Alternatively, you can stop mongod and delete the data files from your data directory, then restart. Hint: you can also move the data files to a subfolder, and delete them if you’re sure you no longer need them.