Tag Archive
The following is a list of all entries tagged with mysql:
Querying Databases in R
Filed in Data Munging, R, R Tip, August 14, 2009, 9:00 amOne of the first things you’ll want to do in R is set it up to talk to databases. The easiest way to do this is using ODBC, via package RODBC.
To get the package, run
> install.packages(RODBC)
Once you have RODBC installed, you call it in R as follows. But it’s very simple: a bit [...]
MySQL, Batch Imports, and Rails
Filed in Data Munging, August 13, 2009, 6:00 amI really love Rails, but it’s not the most performant code in the world. Though it doesn’t often arise in CRUD programming, if you do any sort of stats, ML, or data analytics, you’ll frequently find yourself wanting to import lots of data into your db. You could create an ActiveRecord object for [...]
Writing MySQL Query Results to Disk
Filed in Data Munging, July 14, 2009, 6:57 pmNotes to myself: how to easily write query results to disk using mysql.
mysql -h main-backup.local -u earl -e “select count(*) from adsense_analytics_days;” -p collegelist_development > csvname.csv;
where h specifies the name of the mysql server, u the username, e the query, p the database.
This will output a tsv file; to turn it into csv try using [...]