Posts

Create MongoDB service in Windows OS

1) Open Command Prompt 2) Create directory for Database and Logs                    mkdir c:\data\db                     mkdir c:\data\log 3) Create a file at C:\mongodb\mongod.cfg and  specifies both systemLog Path and Storage database       path   Add following in mongod.cfg file : systemLog : destination : file path : c:\data\log\mongod.log storage : dbPath : c:\data\db 4) Create service named as "MongoDB" using following command sc.exe create MongoDB binPath= "C:\mongodb\bin\mongod.exe --service --config=\"C:\mongodb\mongod.cfg\"" DisplayName= "MongoDB" start= "auto" 5) To remove MongoDB service use following command sc . exe delete MongoDB  

utf8_general_ci VS utf8_unicode_ci what should we use?

These two collations are both for the UTF-8 character encoding. The differences are in how text is sorted and compared. Note: in new versions of MySQL use utf8mb4 , rather than utf8 , which is the same UTF-8 data format with same performance but previously only accepted the first 65,536 Unicode characters. Accuracy utf8mb4_unicode_ci is based on the Unicode standard for sorting and comparison, which sorts accurately in a very wide range of languages. utf8mb4_general_ci fails to implement all of the Unicode sorting rules, which will result in undesirable sorting in some situations, such as when using particular languages or characters. Performance utf8mb4_general_ci is faster at comparisons and sorting, because it takes a bunch of performance-related shortcuts. On modern servers, this performance boost will be all but negligible. It was devised in a time when servers had a tiny fraction of the CPU performance of today's computers. utf8mb4_unicode_c

How to show records in same order where IDs are put into the IN() clause?

    How to show records in same order where IDs are put into the IN() clause?     1) SELECT id FROM table1 WHERE ... ORDER BY display_order , name 2) SELECT name , description , ... WHERE id IN ([ id ' s from first ])   The issue is that the second query does not return the results in the same order  that the IDs are put into the IN() clause.    Solution :-  SELECT name , description , ... FROM ... WHERE id IN ([ ids , any order ]) ORDER BY FIELD ( id , [ ids in order ])

Is a BLOB converted using the current/default charset in MySQL?

Blob data used MySQL charset which is in my.ini default-character-set=latin1 Suppose I have a table with a BLOB field. The charset of the table is UTF-8. I connect to the DB and "SET CHARACTER SET utf8". Then I save binary data into the field. Then I retrieve the data, and it's not what I saved (corrupt). Because while retrieving data blob data used mysql default charset set. Ref : http://stackoverflow.com/questions/14734812/is-a-blob-converted-using-the-current-default-charset-in-mysql

Pentaho/R Integration Plugin

Image
http://dekarlab.de/wp/?p=5 Pentaho R Integration Plugin is used to execute R code direct from Pentaho Data Integration (PDI). R Script Plugin can be downloaded here:  Downloads Installation R script plugin can be installed by performing the following steps: 1) Copy the plugin folder (RScriptPlugin) into the folder of your PDI installation: data-integration\plugins\steps 2) Install R project from the site http://www.r-project.org/ 3) Install rJava package in R by executing: install.packages(“rJava”) 4) Copy JRI library rJava/jri/jri.dll (windows) or rJava/jri/libjri.so (linux) to: data-integration/libswt/{your operation system} 5) Specify location of R using R_HOME environment variable. (like: C:\R\R-3.0.2). 6) For windows, it is also needed to put in PATH variable the path to R.dll, for example: C:\R\R-3.0.2\bin\{your operation system} 7) The plugin can be found under Sripting Folder in Design Tab: Note: to check the installation press Help bu

Debunking GROUP BY myths

http://rpbouman.blogspot.co.uk/2007/05/debunking-group-by-myths.html

Maintain the Pentaho BA 5.0 Server Manually

https://help.pentaho.com/Documentation/5.2/0P0/000/050 http://infocenter.pentaho.com/help/index.jsp?topic=%2Fadmin_guide%2Ftask_config_baserver_manually.html \biserver-ce\tomcat\webapps\pentaho\mantle\home\content\welcome\index.html comment line no 27 to 37 for unvisible Learn, Contribute, Meet the Family \biserver-ce\tomcat\webapps\pentaho\mantle\home\content\welcome\img add your logo in above path and add image path in line no 27     <div class="header-navigation">         <img src="img/company_logo.png">     </div>        \biserver-ce\tomcat\webapps\pentaho\jsp\PUCLogin.jsp