├── .gitignore ├── README.md ├── aws_emr └── aws.txt ├── hive ├── hw2-hive-solutions.sql ├── init.sql └── purchases.txt ├── input ├── file1 └── file2 ├── java-example ├── WordCount.java ├── compile.sh ├── run.sh └── wc.jar └── python-example ├── mapper.py ├── reducer.py └── run.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.log 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hadoop 2 | === 3 | 4 | This is a quick guide on getting your feet wet with Hadoop. It'll teach you how to setup a single-node hadoop cluster, run jobs in Java/Python and lastly, explore the results. 5 | 6 | #### Getting Hadoop 7 | 8 | The easiest way to try out Hadoop locally as a developer is by running a preconfigured-VM. 9 | 10 | 1. Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) for your Operating System. 11 | 2. For the VM, we'll be using Cloudera's VM that they made available for Udacity. Unlike the official Cloudera Hadoop distribution (CHD) this is a more stripped down version (1.7 GB). Download the file from [here](http://content.udacity-data.com/courses/ud617/Cloudera-Udacity-Training-VM-4.1.1.c.zip) and unzip it. If you are on a Windows machine you will likely need to use WinRAR to open this .zip file because other methods fail to open the unzipped file (which exceeds the maximum specified 4GB for a .zip file). 12 | 3. Open Virtualbox and click on "New". 13 | 4. Give a name "Hadoop", Type as "Linux" and Version as "Ubuntu (64-bit)" 14 | 5. Drag the slider to select a memory of 2048 MB 15 | 6. In the hard disk section, click the radio button "Use an existing virtual hard disk file", browse to your download directory and select the `Cloudera-Training-VM-4.1.1.c.vmdk` file. 16 | 7. Now you should see a "hadoop" machine in the sidebar. Select it and click on Settings. 17 | 8. Choose network from the top panel, and change the "Attached to" to Bridged Adapter. 18 | 9. You can now select the machine, and click on "Start". 19 | 10. Your machine will now boot up. 20 | 21 | ![img](http://i.imgur.com/N0GS3b1.jpg) 22 | 23 | #### Running Jobs 24 | 25 | Before we start running MapReduce jobs, we first need to get the code. When the VM first starts, the terminal should already be open. Get started by cloning this repository. 26 | 27 | ``` 28 | $ cd ~/Desktop 29 | $ git clone https://github.com/prakhar1989/csds-material 30 | $ cd csds-material 31 | ``` 32 | 33 | Linux and Mac users can also SSH into the machine by running `ssh training@ip-address` and entering the password - `training`. To get the IP address of the machine, just run `ifconfig` and taking note of the inet addr. 34 | 35 | ![ip](http://i.imgur.com/VUMJkVy.png) 36 | 37 | The `csds-material` directory has an input folder which describes the input on which we'll running our MapReduce jobs. To view the contents, just type the following - 38 | 39 | ``` 40 | $ cat input/* 41 | Hello World Bye World 42 | Hello Hadoop Goodbye Hadoop 43 | ``` 44 | 45 | The job that we're going to run is the canonical wordcount example - it counts the number of words in a file (set of files). 46 | 47 | #### HDFS 48 | HDFS or Hadoop FileSystem is the filesystem where Hadoop expects the input files to be. When a job completes, HDFS is also where the final result will be placed by Hadoop. So the first thing we need to do, is to move our input files into HDFS. 49 | ``` 50 | $ hadoop fs -ls /user/ 51 | drwxr-xr-x - hue supergroup 0 2013-09-05 20:08 /user/hive 52 | drwxr-xr-x - hue hue 0 2013-09-10 10:37 /user/hue 53 | drwxr-xr-x - training supergroup 0 2013-10-04 18:58 /user/training 54 | 55 | $ hadoop fs -mkdir /user/csds 56 | $ hadoop fs -copyFromLocal input /user/csds/ 57 | $ hadoop fs -ls /user/csds/input 58 | Found 2 items 59 | -rw-r--r-- 1 training supergroup 22 2016-01-25 23:06 /user/csds/input/file1 60 | -rw-r--r-- 1 training supergroup 28 2016-01-25 23:06 /user/csds/input/file2 61 | ``` 62 | 63 | Great! Now that we have our data residing in HDFS, lets run our mapreduce job! 64 | 65 | 66 | ##### Java 67 | 68 | To run the java job, we'll first create a jar and then tell `hadoop` to run it. 69 | 70 | ``` 71 | $ cd java-example 72 | $ export HADOOP_CLASSPATH=${JAVA_HOME}/lib/tools.jar 73 | $ hadoop com.sun.tools.javac.Main WordCount.java 74 | $ jar cf wc.jar WordCount*.class 75 | ``` 76 | When this is done, we'll have a `wc.jar` in our directory which we'll use to run a MapReduce job. 77 | 78 | ``` 79 | $ hadoop jar wc.jar WordCount /user/csds/input /user/csds/output 80 | 16/01/25 23:09:47 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 81 | 16/01/25 23:09:47 INFO input.FileInputFormat: Total input paths to process : 2 82 | 16/01/25 23:09:47 WARN snappy.LoadSnappy: Snappy native library is available 83 | 16/01/25 23:09:47 INFO snappy.LoadSnappy: Snappy native library loaded 84 | 16/01/25 23:09:47 INFO mapred.JobClient: Running job: job_201601252122_0010 85 | 16/01/25 23:09:48 INFO mapred.JobClient: map 0% reduce 0% 86 | 16/01/25 23:09:53 INFO mapred.JobClient: map 100% reduce 0% 87 | 16/01/25 23:09:55 INFO mapred.JobClient: map 100% reduce 100% 88 | 16/01/25 23:09:56 INFO mapred.JobClient: Job complete: job_201601252122_0010 89 | 16/01/25 23:09:56 INFO mapred.JobClient: Counters: 32 90 | 16/01/25 23:09:56 INFO mapred.JobClient: File System Counters 91 | 16/01/25 23:09:56 INFO mapred.JobClient: FILE: Number of bytes read=79 92 | 16/01/25 23:09:56 INFO mapred.JobClient: FILE: Number of bytes written=544598 93 | 16/01/25 23:09:56 INFO mapred.JobClient: FILE: Number of read operations=0 94 | 16/01/25 23:09:56 INFO mapred.JobClient: FILE: Number of large read operations=0 95 | 16/01/25 23:09:56 INFO mapred.JobClient: FILE: Number of write operations=0 96 | 16/01/25 23:09:56 INFO mapred.JobClient: HDFS: Number of bytes read=262 97 | 16/01/25 23:09:56 INFO mapred.JobClient: HDFS: Number of bytes written=41 98 | 16/01/25 23:09:56 INFO mapred.JobClient: HDFS: Number of read operations=4 99 | 16/01/25 23:09:56 INFO mapred.JobClient: HDFS: Number of large read operations=0 100 | 16/01/25 23:09:56 INFO mapred.JobClient: HDFS: Number of write operations=1 101 | 16/01/25 23:09:56 INFO mapred.JobClient: Job Counters 102 | 16/01/25 23:09:56 INFO mapred.JobClient: Launched map tasks=2 103 | 16/01/25 23:09:56 INFO mapred.JobClient: Launched reduce tasks=1 104 | 16/01/25 23:09:56 INFO mapred.JobClient: Rack-local map tasks=2 105 | 16/01/25 23:09:56 INFO mapred.JobClient: Total time spent by all maps in occupied slots (ms)=7528 106 | 16/01/25 23:09:56 INFO mapred.JobClient: Total time spent by all reduces in occupied slots (ms)=2476 107 | 16/01/25 23:09:56 INFO mapred.JobClient: Total time spent by all maps waiting after reserving slots (ms)=0 108 | 16/01/25 23:09:56 INFO mapred.JobClient: Total time spent by all reduces waiting after reserving slots (ms)=0 109 | 16/01/25 23:09:56 INFO mapred.JobClient: Map-Reduce Framework 110 | 16/01/25 23:09:56 INFO mapred.JobClient: Map input records=2 111 | 16/01/25 23:09:56 INFO mapred.JobClient: Map output records=8 112 | 16/01/25 23:09:56 INFO mapred.JobClient: Map output bytes=82 113 | 16/01/25 23:09:56 INFO mapred.JobClient: Input split bytes=212 114 | 16/01/25 23:09:56 INFO mapred.JobClient: Combine input records=8 115 | 16/01/25 23:09:56 INFO mapred.JobClient: Combine output records=6 116 | 16/01/25 23:09:56 INFO mapred.JobClient: Reduce input groups=5 117 | 16/01/25 23:09:56 INFO mapred.JobClient: Reduce shuffle bytes=85 118 | 16/01/25 23:09:56 INFO mapred.JobClient: Reduce input records=6 119 | 16/01/25 23:09:56 INFO mapred.JobClient: Reduce output records=5 120 | 16/01/25 23:09:56 INFO mapred.JobClient: Spilled Records=12 121 | 16/01/25 23:09:56 INFO mapred.JobClient: CPU time spent (ms)=890 122 | 16/01/25 23:09:56 INFO mapred.JobClient: Physical memory (bytes) snapshot=348463104 123 | 16/01/25 23:09:56 INFO mapred.JobClient: Virtual memory (bytes) snapshot=1163071488 124 | 16/01/25 23:09:56 INFO mapred.JobClient: Total committed heap usage (bytes)=337780736 125 | ``` 126 | Our job has now run! To see the output, we can view the `/user/csds/output/` directory. 127 | 128 | ``` 129 | $ hadoop fs -ls /user/csds/output 130 | Found 3 items 131 | -rw-r--r-- 1 training supergroup 0 2016-01-25 23:09 /user/csds/output/_SUCCESS 132 | drwxr-xr-x - training supergroup 0 2016-01-25 23:09 /user/csds/output/_logs 133 | -rw-r--r-- 1 training supergroup 41 2016-01-25 23:09 /user/csds/output/part-r-00000 134 | 135 | $ hadoop fs -cat /user/csds/output/part-r-00000 136 | Bye 1 137 | Goodbye 1 138 | Hadoop 2 139 | Hello 2 140 | World 2 141 | ``` 142 | Awesome! Our hadoop job ran correctly. 143 | 144 | ##### Python 145 | 146 | Hadoop, by default, only supports Java for writing MR jobs. However, its [streaming](http://hadoop.apache.org/docs/r1.2.1/streaming.html) API allows us to provide any shell executable program to be the mapper and the reducer. The `python-example` folder has the corresponding code for `mapper` and `reducer`. 147 | 148 | Since our `input` folder already exists in HDFS, we will not need to create the folder again. Let's directly run the MR job 149 | 150 | ``` 151 | $ cd python-example 152 | $ hs mapper.py reducer.py /user/csds/input/* /user/csds/outputpy 153 | packageJobJar: [mapper.py, reducer.py, /tmp/hadoop-training/hadoop-unjar6628549512020884250/] [] /tmp/streamjob6598847338247804626.jar tmpDir=null 154 | 16/01/26 00:29:26 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 155 | 16/01/26 00:29:26 WARN snappy.LoadSnappy: Snappy native library is available 156 | 16/01/26 00:29:26 INFO snappy.LoadSnappy: Snappy native library loaded 157 | 16/01/26 00:29:26 INFO mapred.FileInputFormat: Total input paths to process : 2 158 | 16/01/26 00:29:27 INFO streaming.StreamJob: getLocalDirs(): [/var/lib/hadoop-hdfs/cache/training/mapred/local] 159 | 16/01/26 00:29:27 INFO streaming.StreamJob: Running job: job_201601260027_0001 160 | 16/01/26 00:29:27 INFO streaming.StreamJob: To kill this job, run: 161 | 16/01/26 00:29:27 INFO streaming.StreamJob: UNDEF/bin/hadoop job -Dmapred.job.tracker=0.0.0.0:8021 -kill job_201601260027_0001 162 | 16/01/26 00:29:27 INFO streaming.StreamJob: Tracking URL: http://0.0.0.0:50030/jobdetails.jsp?jobid=job_201601260027_0001 163 | 16/01/26 00:29:28 INFO streaming.StreamJob: map 0% reduce 0% 164 | 16/01/26 00:29:32 INFO streaming.StreamJob: map 100% reduce 0% 165 | 16/01/26 00:29:35 INFO streaming.StreamJob: map 100% reduce 100% 166 | 16/01/26 00:29:36 INFO streaming.StreamJob: Job complete: job_201601260027_0001 167 | 16/01/26 00:29:36 INFO streaming.StreamJob: Output: /user/csds/outputpy 168 | 169 | $ hadoop fs -ls /user/csds/outputpy 170 | Found 3 items 171 | -rw-r--r-- 1 training supergroup 0 2016-01-26 00:29 /user/csds/outputpy/_SUCCESS 172 | drwxr-xr-x - training supergroup 0 2016-01-26 00:29 /user/csds/outputpy/_logs 173 | -rw-r--r-- 1 training supergroup 41 2016-01-26 00:29 /user/csds/outputpy/part-00000 174 | 175 | $ hadoop fs -cat /user/csds/outputpy/part-00000 176 | Bye 1 177 | Goodbye 1 178 | Hadoop 2 179 | Hello 2 180 | World 2 181 | ``` 182 | 183 | ##### Tracking jobs 184 | Hadoop provides a simple interface to track the status of MR jobs. To view it, you first need to get the VM ip using `ifconfig`. Then note the `inet addr` address. Finally, open `http://ip:50030/jobtracker.jsp` on your local machine. Alternatively, you can also open Firefox in the VM and browse to `http://localhost:50030/jobtracker.jsp` to view the jobs. 185 | 186 | ![img](http://i.imgur.com/vAxP024.png) 187 | 188 | 189 | ### AWS EMR 190 | 191 | In this section, we'll see how we can use [AWS Elastic Mapreduce](https://aws.amazon.com/elasticmapreduce/) (EMR) to run our MapReduce job. To follow along, make sure you have a functioning AWS account. 192 | 193 | AWS EMR reads and writes data to [AWS S3](https://aws.amazon.com/s3/) so the first step is to upload our application code and input to S3. Head over to the [console](https://console.aws.amazon.com/s3/home?region=us-east-1), create a new bucket (with a unique bucket name) and upload `python-example/mapper.py`, `python-example/reducer.py` and `aws_emr/aws.txt`. 194 | 195 | We can now begin configuring our MR job. Head over to the [EMR console](https://console.aws.amazon.com/elasticmapreduce/home?region=us-east-1) and click on **Create Cluster**. See the screen below for the options to configure - 196 | 197 | ![img](http://i.imgur.com/NAbeCpj.png) 198 | 199 | AWS will then go ahead and follow that up with the cluster creation screen - 200 | 201 | ![img](http://i.imgur.com/eF4pPVK.png) 202 | 203 | The next step is to add a MR step. Click on **Add Step** and fill in the details as shown below. Be sure to change these paths for your S3 bucket. 204 | 205 | ![img](http://i.imgur.com/AuXphLo.png) 206 | 207 | When done, the status of the cluster will change from *Waiting* to *Running*. After a few minutes, your job should be complete. This is indicated by the status of the cluster again going back to *Waiting*. You can now head over to the S3 bucket and see the output being generated. 208 | 209 | ![img](http://i.imgur.com/U2XYgJr.png) 210 | 211 | And that's it! This is how your run MR jobs on AWS EMR! 212 | 213 | Hive 214 | ==== 215 | 216 | This section teaches you how to try out [Hive](https://en.wikipedia.org/wiki/Apache_Hive) on the VM. The Hive data warehouse facilitates querying and managing large datasets residing in distributed storage. Hive provides a mechanism to project structure onto this data and query the data using a SQL-like language called HiveQL. At the same time this language also allows traditional map/reduce programmers to plug in their custom mappers and reducers when it is inconvenient or inefficient to express this logic in HiveQL. 217 | 218 | In this section, we'll see how to use Hive to query a dataset of Shopping Mall purchases. The dataset is located in the `hive/purchases.txt`. Hive is already installed and setup on your VM, so getting started is just a command away. Type the following in the terminal - 219 | 220 | ``` 221 | $ hive 222 | Logging initialized using configuration in file:/etc/hive/conf.dist/hive-log4j.properties 223 | Hive history file=/tmp/training/hive_job_log_training_201602010336_645327107.txt 224 | hive> 225 | ``` 226 | 227 | Let's use the `SHOW TABLES` command to see if any tables exist. Interacting with Hive is exactly like any relational database - so if you've worked with MySQL or PostgreSQL before you'll feel right at home. 228 | ``` 229 | hive> SHOW TABLES; 230 | OK 231 | Time taken: 2.028 seconds 232 | ``` 233 | Since no tables exist, we see a blank list. Now let's go ahead and create a table. 234 | 235 | ``` 236 | hive> CREATE TABLE test_tables; 237 | FAILED: SemanticException [Error 10043]: Either list of columns or a custom serializer should be specified 238 | 239 | hive> CREATE TABLE test_tables (some_text STRING); 240 | OK 241 | Time taken: 0.713 seconds 242 | 243 | hive> SHOW TABLES; 244 | OK 245 | test_tables 246 | Time taken: 0.053 seconds 247 | 248 | hive> select * from test_tables; 249 | OK 250 | Time taken: 0.161 seconds 251 | ``` 252 | 253 | Press `Ctrl-D` to exit from the Hive console. So we created the `test_tables` above, but the first command failed because we didn't provide any schema. Every table that you wish to create must have a schema. In the subsequent command, we provide a dummy column name - `some_text` of the `STRING` type to make the command succeed. Once the table is created, `SHOW TABLES` correctly lists our table. However, since our table has no data, the `select` query returns a blank list. 254 | 255 | Now we know how to create a table in Hive, we'll create a table and add real data. But before we do that, let us inspect the data that we're going to put in. This will be required for coming up with a schema for our database. 256 | 257 | ``` 258 | $ head purchases.txt 259 | 2012-07-20 09:59:00,Corpus Christi,CDs,327.91,Cash 260 | 2012-03-11 17:29:00,Durham,Books,115.09,Discover 261 | 2012-07-31 11:43:00,Rochester,Toys,332.07,MasterCard 262 | 2012-06-18 14:47:00,Garland,Computers,31.99,Visa 263 | 2012-03-27 11:40:00,Tulsa,CDs,452.18,Discover 264 | 2012-05-31 10:57:00,Pittsburgh,Garden,492.25,Amex 265 | 2012-08-22 14:35:00,Richmond,Consumer Electronics,346,Amex 266 | 2012-09-23 16:45:00,Scottsdale,CDs,21.58,Cash 267 | 2012-10-17 11:29:00,Baton Rouge,Computers,226.26,Cash 268 | 2012-07-03 11:05:00,Virginia Beach,Women's Clothing,23.47,Cash 269 | ``` 270 | 271 | We can see above that our data has 5 columns, each separated by a comma. The first column is a timestamp indicating the time and date of the sale. The second column indicates the store location where the sale occured, followed by the category of the product. The last two columns indicate the price and the mode of payment associated with the sale respectively. 272 | 273 | Let's log into `hive` and load this data into HDFS. We'll start by first creating a new table. 274 | 275 | ``` 276 | hive> CREATE TABLE purchases ( 277 | `sales_date` TIMESTAMP, 278 | `store_location` STRING, 279 | `category` STRING, 280 | `price` FLOAT, 281 | `card` STRING 282 | ) row format delimited fields terminated by ',' stored as textfile; 283 | OK 284 | Time taken: 0.177 seconds 285 | ``` 286 | In the above command, we create a new table called `purchases` with the appropriate schema shown above. The `row format ...` command tells Hive that we'll be loading in data from a [csv](https://en.wikipedia.org/wiki/Comma-separated_values) file eventually. The next step is to move our data into HDFS so that we can import it in Hive. Exit from hive and run the following command from the `csds-material` directory. 287 | 288 | ``` 289 | $ hadoop fs -copyFromLocal hive/purchases.txt /user/csds/input 290 | $ hadoop fs -ls /user/csds/input 291 | Found 1 items 292 | -rw-r--r-- 1 training supergroup 53755 2016-02-01 04:29 /user/csds/input/purchases.txt 293 | ``` 294 | Now we have everything in place to load data in Hive. Log back into the `hive` console and run the following - 295 | ``` 296 | hive> LOAD DATA INPATH '/user/csds/input/purchases.txt' INTO TABLE purchases; 297 | Loading data to table default.purchases 298 | OK 299 | Time taken: 2.436 seconds 300 | ``` 301 | Great our data is now loaded. Now let's explore the data 302 | ``` 303 | hive> show tables; 304 | OK 305 | purchases 306 | test_tables 307 | Time taken: 0.133 seconds 308 | 309 | hive> select * from purchases limit 10; 310 | OK 311 | 2012-07-20 09:59:00 Corpus Christi CDs 327.91 Cash 312 | 2012-03-11 17:29:00 Durham Books 115.09 Discover 313 | 2012-07-31 11:43:00 Rochester Toys 332.07 MasterCard 314 | 2012-06-18 14:47:00 Garland Computers 31.99 Visa 315 | 2012-03-27 11:40:00 Tulsa CDs 452.18 Discover 316 | 2012-05-31 10:57:00 Pittsburgh Garden 492.25 Amex 317 | 2012-08-22 14:35:00 Richmond Consumer Electronics 346.0 Amex 318 | 2012-09-23 16:45:00 Scottsdale CDs 21.58 Cash 319 | 2012-10-17 11:29:00 Baton Rouge Computers 226.26 Cash 320 | 2012-07-03 11:05:00 Virginia Beach Women's Clothing 23.47 Cash 321 | Time taken: 0.155 seconds 322 | 323 | hive> select sum(price) from purchases where card = "Cash"; 324 | Total MapReduce jobs = 1 325 | Launching Job 1 out of 1 326 | Number of reduce tasks determined at compile time: 1 327 | In order to change the average load for a reducer (in bytes): 328 | set hive.exec.reducers.bytes.per.reducer= 329 | In order to limit the maximum number of reducers: 330 | set hive.exec.reducers.max= 331 | In order to set a constant number of reducers: 332 | set mapred.reduce.tasks= 333 | Starting Job = job_201602010237_0001, Tracking URL = http://0.0.0.0:50030/jobdetails.jsp?jobid=job_201602010237_0001 334 | Kill Command = /usr/lib/hadoop/bin/hadoop job -Dmapred.job.tracker=0.0.0.0:8021 -kill job_201602010237_0001 335 | Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1 336 | 2016-02-01 04:36:15,505 Stage-1 map = 0%, reduce = 0% 337 | 2016-02-01 04:36:17,537 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 0.57 sec 338 | 2016-02-01 04:36:18,558 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 0.57 sec 339 | 2016-02-01 04:36:19,565 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 1.23 sec 340 | 2016-02-01 04:36:20,582 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 1.23 sec 341 | MapReduce Total cumulative CPU time: 1 seconds 230 msec 342 | Ended Job = job_201602010237_0001 343 | MapReduce Jobs Launched: 344 | Job 0: Map: 1 Reduce: 1 Cumulative CPU: 1.23 sec HDFS Read: 0 HDFS Write: 0 SUCCESS 345 | Total MapReduce CPU Time Spent: 1 seconds 230 msec 346 | OK 347 | 55199.32992255688 348 | Time taken: 9.002 seconds 349 | ``` 350 | In this last query, we ran a simple query to calculate the total price of all the products that were paid in cash. We can see that our query got mapped to MapReduce tasks and got run by Hadoop. Finally at the end, we see the answer to our query - $55199 and also the total time taken. 351 | 352 | So this is how you can use Hive and the power of SQL to analyse your big data that is already stored on an HDFS cluster. For more practice, try running your own queries and see what you can uncover. If you're feeling adventurous, try to formuate the queries for answering the questions below - 353 | 354 | 1. What is the average price of the products that were purchased via Mastercard? 355 | 2. Which date recorded the highest total sales? 356 | 3. What is the minimum value of a product under the Computers category? 357 | 4. How many distinct categories of products are there? 358 | 5. Which store location had the lowest total sales? 359 | 360 | If you need help with HiveQL, [this](https://docs.treasuredata.com/articles/hive) documentation should be useful. 361 | 362 | 363 | -------------------------------------------------------------------------------- /aws_emr/aws.txt: -------------------------------------------------------------------------------- 1 | t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc. 2 | -------------------------------------------------------------------------------- /hive/hw2-hive-solutions.sql: -------------------------------------------------------------------------------- 1 | /* Solutions for the Hive Assignment: */ 2 | 3 | /* 1. What is the average price of the products that were purchased via Mastercard? */ 4 | 5 | SELECT AVG(price) 6 | FROM purchases 7 | WHERE card=”MasterCard”; 8 | 9 | > 275.0677 10 | 11 | /* 2. Which date recorded the highest total sales? 12 | 13 | - need to group by according to to_date(sales_date) and not just sales_date because the field contains time information also. 14 | */ 15 | 16 | SELECT to_date(sales_date), SUM(price) AS total_sales 17 | FROM purchases 18 | GROUP BY to_date(sales_date) 19 | SORT BY total_sales DESC LIMIT 1; 20 | 21 | > 2012-03-17 2384.48 22 | 23 | /* 3. What is the minimum value of a product under the Computers category? */ 24 | 25 | SELECT MIN(price) 26 | FROM purchases 27 | WHERE category=”Computers”; 28 | 29 | > 0.38 30 | 31 | /* 4. How many distinct categories of products are there? */ 32 | 33 | SELECT COUNT(DISTINCT category) 34 | FROM purchases; 35 | 36 | > 18 37 | 38 | /* 5. Which store location had the lowest total sales? */ 39 | 40 | SELECT store_location, SUM(price) AS store_sales 41 | FROM purchases 42 | GROUP BY store_location 43 | ORDER BY store_sales LIMIT 1; 44 | 45 | > Plano 784.9599 46 | 47 | -------------------------------------------------------------------------------- /hive/init.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE purchases; 2 | 3 | CREATE TABLE purchases ( 4 | `sales_date` TIMESTAMP, 5 | `store_location` STRING, 6 | `category` STRING, 7 | `price` FLOAT, 8 | `card` STRING 9 | ) row format delimited fields 10 | terminated by ',' stored as textfile; 11 | 12 | LOAD DATA INPATH '/user/csds/input/purchases.txt' INTO TABLE purchases; 13 | -------------------------------------------------------------------------------- /hive/purchases.txt: -------------------------------------------------------------------------------- 1 | 2012-07-20 09:59:00,Corpus Christi,CDs,327.91,Cash 2 | 2012-03-11 17:29:00,Durham,Books,115.09,Discover 3 | 2012-07-31 11:43:00,Rochester,Toys,332.07,MasterCard 4 | 2012-06-18 14:47:00,Garland,Computers,31.99,Visa 5 | 2012-03-27 11:40:00,Tulsa,CDs,452.18,Discover 6 | 2012-05-31 10:57:00,Pittsburgh,Garden,492.25,Amex 7 | 2012-08-22 14:35:00,Richmond,Consumer Electronics,346,Amex 8 | 2012-09-23 16:45:00,Scottsdale,CDs,21.58,Cash 9 | 2012-10-17 11:29:00,Baton Rouge,Computers,226.26,Cash 10 | 2012-07-03 11:05:00,Virginia Beach,Women's Clothing,23.47,Cash 11 | 2012-08-18 09:31:00,Norfolk,Men's Clothing,379.33,Cash 12 | 2012-01-20 14:07:00,Wichita,Video Games,392.43,Cash 13 | 2012-11-27 12:16:00,Saint Paul,Books,281.64,Discover 14 | 2012-03-15 09:40:00,St. Petersburg,CDs,9.86,Visa 15 | 2012-01-02 10:39:00,Minneapolis,Baby,116.67,Amex 16 | 2012-09-30 09:13:00,El Paso,Health and Beauty,487.24,MasterCard 17 | 2012-09-20 13:52:00,Los Angeles,Health and Beauty,139.15,Discover 18 | 2012-02-10 09:16:00,Toledo,Music,340.31,Amex 19 | 2012-08-11 17:34:00,Jacksonville,Pet Supplies,442.18,Amex 20 | 2012-08-17 11:35:00,Toledo,Baby,360.29,MasterCard 21 | 2012-04-21 14:46:00,Lubbock,Books,415.14,MasterCard 22 | 2012-07-14 15:57:00,Fresno,Garden,382.04,Discover 23 | 2012-07-21 13:09:00,Washington,Video Games,377.52,Cash 24 | 2012-10-02 09:56:00,Raleigh,Music,81.63,Cash 25 | 2012-09-25 15:11:00,Toledo,Books,241.37,Cash 26 | 2012-12-09 15:11:00,Cleveland,Video Games,474.77,Visa 27 | 2012-05-28 09:23:00,Cincinnati,Garden,409.18,Discover 28 | 2012-01-05 11:30:00,Saint Paul,Pet Supplies,280.2,Visa 29 | 2012-05-31 14:14:00,San Francisco,Crafts,174.92,Amex 30 | 2012-10-24 16:09:00,St. Louis,Toys,497.48,Cash 31 | 2012-06-23 09:36:00,Lubbock,Pet Supplies,328.06,Amex 32 | 2012-09-11 11:06:00,Cincinnati,Cameras,124.88,Amex 33 | 2012-10-03 16:02:00,Louisville,Garden,456.16,Discover 34 | 2012-02-08 11:55:00,Tampa,Pet Supplies,73.3,Cash 35 | 2012-04-09 14:27:00,Scottsdale,Sporting Goods,226.33,Discover 36 | 2012-05-03 14:25:00,Cincinnati,Garden,299.53,Visa 37 | 2012-09-13 16:34:00,Saint Paul,Men's Clothing,437.93,Discover 38 | 2012-12-07 14:39:00,Baltimore,Children's Clothing,427.37,Visa 39 | 2012-12-11 11:15:00,Hialeah,Children's Clothing,365.94,Cash 40 | 2012-05-09 12:45:00,San Jose,Cameras,337.19,Discover 41 | 2012-05-19 17:42:00,Omaha,Computers,479.46,Cash 42 | 2012-08-07 14:26:00,Kansas City,Cameras,293.24,Visa 43 | 2012-11-04 14:00:00,Norfolk,Health and Beauty,285.25,Amex 44 | 2012-12-10 13:52:00,Colorado Springs,Crafts,143.56,Amex 45 | 2012-11-13 14:39:00,Aurora,Garden,124.22,Visa 46 | 2012-07-06 10:02:00,Albuquerque,Health and Beauty,2.77,Cash 47 | 2012-07-19 16:26:00,Lubbock,Music,474.48,MasterCard 48 | 2012-06-14 15:15:00,San Francisco,Baby,187.52,Cash 49 | 2012-10-25 09:10:00,Louisville,Garden,454.58,Amex 50 | 2012-02-12 14:25:00,Cincinnati,Music,155.3,Visa 51 | 2012-02-16 17:44:00,Dallas,Garden,113.15,Cash 52 | 2012-10-29 16:24:00,Toledo,Women's Clothing,24.44,Visa 53 | 2012-12-22 14:44:00,Long Beach,Computers,433.52,Discover 54 | 2012-05-19 13:23:00,Madison,Cameras,142.54,Visa 55 | 2012-04-24 09:21:00,Anchorage,Children's Clothing,476.41,Discover 56 | 2012-09-26 13:18:00,Pittsburgh,Men's Clothing,453.88,Amex 57 | 2012-06-27 13:32:00,Tulsa,Baby,422.24,Cash 58 | 2012-08-30 14:43:00,San Jose,Men's Clothing,1.09,Cash 59 | 2012-03-01 12:46:00,Stockton,Garden,362.78,Discover 60 | 2012-11-16 11:07:00,Fort Wayne,CDs,475.58,Cash 61 | 2012-09-13 15:56:00,Columbus,CDs,51.35,Discover 62 | 2012-05-16 17:58:00,Anchorage,Toys,140.6,Discover 63 | 2012-07-14 11:40:00,Irving,DVDs,316.52,MasterCard 64 | 2012-01-18 12:05:00,Santa Ana,Health and Beauty,306,Cash 65 | 2012-05-23 10:26:00,Reno,DVDs,420.45,Discover 66 | 2012-10-23 11:03:00,Birmingham,DVDs,486.42,Discover 67 | 2012-09-13 11:56:00,Fremont,CDs,331.97,Amex 68 | 2012-08-14 10:59:00,Columbus,Consumer Electronics,158.5,Cash 69 | 2012-04-24 13:03:00,Jacksonville,Sporting Goods,420.77,MasterCard 70 | 2012-12-24 16:20:00,Honolulu,Consumer Electronics,423.69,MasterCard 71 | 2012-10-07 11:13:00,Houston,Consumer Electronics,247.06,Cash 72 | 2012-08-16 10:03:00,San Diego,Health and Beauty,5.67,Visa 73 | 2012-08-08 10:20:00,Tulsa,Cameras,313.32,Cash 74 | 2012-09-12 14:52:00,Hialeah,CDs,176.41,Amex 75 | 2012-08-24 14:09:00,Phoenix,Computers,191.86,Cash 76 | 2012-05-06 15:33:00,Baltimore,Women's Clothing,234.93,MasterCard 77 | 2012-09-06 16:18:00,San Bernardino,Children's Clothing,230.86,Amex 78 | 2012-10-29 13:12:00,Buffalo,Children's Clothing,238.39,Amex 79 | 2012-08-22 13:35:00,Boston,Books,178.59,Visa 80 | 2012-10-21 10:10:00,Oakland,Sporting Goods,497.84,Visa 81 | 2012-09-28 12:50:00,Fort Wayne,Garden,441.31,Visa 82 | 2012-07-09 17:32:00,Sacramento,CDs,324.93,Cash 83 | 2012-02-10 13:27:00,Lubbock,Books,443.44,Discover 84 | 2012-05-26 11:56:00,Reno,Men's Clothing,25.85,Visa 85 | 2012-05-03 12:25:00,Nashville,Health and Beauty,288.93,Cash 86 | 2012-12-19 09:04:00,Riverside,Women's Clothing,151.55,Visa 87 | 2012-10-18 15:59:00,Chandler,Baby,208.14,Discover 88 | 2012-11-23 12:06:00,Phoenix,Pet Supplies,305.98,Discover 89 | 2012-01-11 10:45:00,Sacramento,Women's Clothing,257.19,Cash 90 | 2012-09-05 09:13:00,Lubbock,Cameras,139.69,Cash 91 | 2012-06-27 15:51:00,Winston–Salem,CDs,370.81,Amex 92 | 2012-03-17 11:35:00,Virginia Beach,Pet Supplies,279.51,Discover 93 | 2012-05-25 12:15:00,Baton Rouge,Music,251.28,MasterCard 94 | 2012-07-22 14:37:00,Birmingham,Crafts,393.85,Discover 95 | 2012-11-29 14:58:00,Phoenix,Children's Clothing,399.9,Cash 96 | 2012-02-24 14:41:00,Honolulu,Video Games,453.89,Amex 97 | 2012-11-19 17:11:00,Greensboro,Baby,64.25,MasterCard 98 | 2012-01-27 16:25:00,Scottsdale,Cameras,258.67,Discover 99 | 2012-03-19 16:14:00,Chula Vista,Health and Beauty,346.99,MasterCard 100 | 2012-07-20 11:29:00,Corpus Christi,Toys,102.89,Discover 101 | 2012-09-10 17:00:00,Miami,Pet Supplies,78.96,Amex 102 | 2012-03-19 13:37:00,Lubbock,Cameras,425.79,Visa 103 | 2012-09-23 12:43:00,Riverside,CDs,147.81,MasterCard 104 | 2012-02-26 15:56:00,Boise,Pet Supplies,498.3,Amex 105 | 2012-03-09 16:57:00,Norfolk,Sporting Goods,170.12,Visa 106 | 2012-12-10 15:31:00,Winston–Salem,Health and Beauty,263.54,Amex 107 | 2012-01-10 13:57:00,Fort Worth,Books,15,MasterCard 108 | 2012-09-23 12:26:00,Toledo,Toys,54.17,Discover 109 | 2012-03-02 13:54:00,Fremont,Pet Supplies,170.78,Discover 110 | 2012-12-31 14:48:00,Newark,Men's Clothing,312.24,Cash 111 | 2012-05-01 09:31:00,Stockton,Sporting Goods,480.86,Cash 112 | 2012-01-19 15:39:00,Raleigh,Men's Clothing,235.51,MasterCard 113 | 2012-11-19 13:19:00,Saint Paul,Cameras,480.85,Discover 114 | 2012-02-21 15:57:00,Anaheim,DVDs,279.76,MasterCard 115 | 2012-05-25 14:48:00,New York,DVDs,448.85,Cash 116 | 2012-11-29 10:21:00,Boston,Books,176.52,Discover 117 | 2012-12-30 16:10:00,Buffalo,Books,430.61,Cash 118 | 2012-07-22 10:16:00,New Orleans,Video Games,297.79,Visa 119 | 2012-04-02 16:33:00,Detroit,Consumer Electronics,314.85,Cash 120 | 2012-06-27 17:00:00,Norfolk,DVDs,309.62,Visa 121 | 2012-01-29 16:38:00,Jacksonville,Toys,232.38,MasterCard 122 | 2012-10-25 15:21:00,Jacksonville,Computers,89.66,Cash 123 | 2012-06-19 13:06:00,Richmond,Garden,401.83,Cash 124 | 2012-09-20 10:27:00,Baton Rouge,Health and Beauty,52.12,Amex 125 | 2012-11-26 10:33:00,Irving,Toys,71.62,Visa 126 | 2012-02-02 13:09:00,Fort Worth,Books,138.41,Cash 127 | 2012-01-06 11:58:00,Aurora,Video Games,346.63,Amex 128 | 2012-02-09 11:25:00,Los Angeles,Computers,87.35,MasterCard 129 | 2012-10-03 13:44:00,Miami,Sporting Goods,294.7,Visa 130 | 2012-11-08 16:14:00,Austin,Men's Clothing,331.04,MasterCard 131 | 2012-04-06 15:52:00,Anaheim,Women's Clothing,159,Visa 132 | 2012-02-07 10:48:00,Jersey City,DVDs,445.23,Visa 133 | 2012-05-31 15:14:00,Anaheim,Baby,174.99,MasterCard 134 | 2012-06-29 11:35:00,Denver,Music,66.14,Visa 135 | 2012-02-25 12:33:00,Houston,CDs,349.75,Cash 136 | 2012-12-15 12:03:00,Boise,Garden,402.57,MasterCard 137 | 2012-12-15 12:11:00,Garland,Children's Clothing,243.09,Amex 138 | 2012-12-08 11:58:00,Mesa,CDs,1.56,Visa 139 | 2012-03-07 11:25:00,Los Angeles,CDs,186.06,Visa 140 | 2012-12-23 17:32:00,Laredo,Cameras,174.05,Amex 141 | 2012-04-29 10:10:00,Aurora,Books,332.78,Discover 142 | 2012-06-30 12:45:00,Newark,Garden,276.13,Discover 143 | 2012-03-28 16:30:00,Wichita,Men's Clothing,18.19,Cash 144 | 2012-03-07 11:23:00,Boise,Women's Clothing,123.24,Amex 145 | 2012-01-14 12:43:00,Rochester,DVDs,248.63,Visa 146 | 2012-08-14 12:10:00,Milwaukee,Music,81.75,Discover 147 | 2012-05-04 15:30:00,Oakland,Baby,44.89,MasterCard 148 | 2012-05-31 16:52:00,Pittsburgh,Video Games,166.04,Visa 149 | 2012-04-09 16:37:00,Anaheim,DVDs,325.98,Cash 150 | 2012-07-23 10:07:00,North Las Vegas,Children's Clothing,320.54,Amex 151 | 2012-01-02 15:50:00,San Bernardino,Computers,250.37,Amex 152 | 2012-07-17 10:19:00,Minneapolis,Books,234.37,Discover 153 | 2012-10-20 10:23:00,Fresno,Health and Beauty,74.22,Discover 154 | 2012-07-29 16:45:00,Spokane,Women's Clothing,432.26,Visa 155 | 2012-09-01 12:53:00,Garland,DVDs,250.51,Cash 156 | 2012-03-17 14:10:00,Austin,Health and Beauty,255.41,MasterCard 157 | 2012-09-17 15:11:00,Wichita,Consumer Electronics,372.33,MasterCard 158 | 2012-05-19 11:05:00,Atlanta,Consumer Electronics,256.13,MasterCard 159 | 2012-08-19 14:06:00,Austin,Toys,228.04,Amex 160 | 2012-03-05 09:55:00,Arlington,Computers,212.74,MasterCard 161 | 2012-09-24 16:21:00,Colorado Springs,Sporting Goods,346.44,Cash 162 | 2012-01-13 16:27:00,Philadelphia,Sporting Goods,310.49,MasterCard 163 | 2012-11-02 17:06:00,Memphis,Cameras,366.01,Visa 164 | 2012-04-12 15:17:00,Wichita,Computers,440.21,Cash 165 | 2012-10-04 09:38:00,Albuquerque,Garden,248.99,Amex 166 | 2012-06-09 13:56:00,Memphis,CDs,145.44,Amex 167 | 2012-01-14 13:35:00,North Las Vegas,Crafts,438.54,Amex 168 | 2012-04-30 15:27:00,Miami,Sporting Goods,419.03,Amex 169 | 2012-05-10 10:29:00,Boise,Books,138.81,Discover 170 | 2012-05-20 16:05:00,Laredo,Cameras,371.78,Visa 171 | 2012-03-08 11:28:00,Greensboro,Music,285.53,MasterCard 172 | 2012-04-11 16:08:00,Denver,Crafts,57.01,Cash 173 | 2012-10-06 17:26:00,Arlington,Pet Supplies,53.93,Discover 174 | 2012-04-06 14:21:00,Newark,CDs,464.37,Amex 175 | 2012-10-23 10:49:00,Columbus,Music,320.32,MasterCard 176 | 2012-07-09 17:04:00,Columbus,Consumer Electronics,152.97,Cash 177 | 2012-05-30 13:26:00,St. Louis,Computers,0.38,Amex 178 | 2012-11-19 13:28:00,Atlanta,Baby,436.12,Visa 179 | 2012-09-27 16:08:00,Baltimore,Women's Clothing,39.21,Visa 180 | 2012-08-02 09:43:00,Laredo,Children's Clothing,493.02,Visa 181 | 2012-06-02 11:28:00,Washington,CDs,262.53,Visa 182 | 2012-12-08 15:55:00,San Diego,Cameras,83.73,MasterCard 183 | 2012-02-12 17:19:00,Chesapeake,Video Games,413.86,Discover 184 | 2012-05-14 15:15:00,Chula Vista,Health and Beauty,336.99,Discover 185 | 2012-08-11 13:13:00,Chandler,Consumer Electronics,197.18,Amex 186 | 2012-07-31 16:30:00,Honolulu,Sporting Goods,432.14,Discover 187 | 2012-07-15 09:34:00,Miami,Cameras,166.61,MasterCard 188 | 2012-04-20 14:17:00,San Francisco,Video Games,184.94,MasterCard 189 | 2012-10-30 10:59:00,Plano,Consumer Electronics,188.37,Cash 190 | 2012-06-29 12:42:00,St. Petersburg,Cameras,88.96,Amex 191 | 2012-09-21 11:23:00,Anchorage,Pet Supplies,444.22,Cash 192 | 2012-02-09 17:08:00,Henderson,Music,276.56,MasterCard 193 | 2012-05-21 09:41:00,Chicago,DVDs,341.35,Amex 194 | 2012-05-06 15:30:00,Honolulu,DVDs,128.98,MasterCard 195 | 2012-02-24 17:42:00,Portland,DVDs,450.48,MasterCard 196 | 2012-02-14 17:15:00,New York,Garden,426.45,MasterCard 197 | 2012-08-22 15:19:00,Baton Rouge,Cameras,442.15,Amex 198 | 2012-05-26 09:06:00,St. Petersburg,Baby,67.79,Cash 199 | 2012-08-23 13:02:00,Minneapolis,Pet Supplies,8.86,Cash 200 | 2012-05-06 10:16:00,Bakersfield,Children's Clothing,295.64,Discover 201 | 2012-11-29 14:59:00,Bakersfield,Women's Clothing,214.37,Visa 202 | 2012-05-29 11:37:00,St. Petersburg,Crafts,139.25,Visa 203 | 2012-01-02 15:10:00,Oakland,Cameras,31.6,Visa 204 | 2012-07-14 10:56:00,El Paso,Children's Clothing,280.46,Cash 205 | 2012-09-16 09:30:00,Toledo,Toys,438.97,Visa 206 | 2012-02-18 13:51:00,Bakersfield,Cameras,287.17,Amex 207 | 2012-05-14 15:48:00,Garland,Crafts,134.95,Cash 208 | 2012-12-03 11:19:00,Glendale,Video Games,489.34,MasterCard 209 | 2012-05-06 09:29:00,Fresno,Baby,327.17,Amex 210 | 2012-02-14 16:14:00,Orlando,Children's Clothing,190.74,Discover 211 | 2012-09-27 15:35:00,Laredo,Books,287.77,Cash 212 | 2012-09-19 10:26:00,Detroit,Sporting Goods,243.32,Cash 213 | 2012-08-27 12:53:00,Rochester,Garden,61.08,Discover 214 | 2012-10-16 17:40:00,Boston,Cameras,214.59,Amex 215 | 2012-08-22 10:47:00,Orlando,Music,228.05,Visa 216 | 2012-07-30 11:30:00,El Paso,Garden,244.48,Visa 217 | 2012-09-22 17:11:00,Portland,Computers,147.54,Visa 218 | 2012-07-30 13:29:00,Newark,Crafts,401.23,Amex 219 | 2012-07-16 12:42:00,Spokane,Children's Clothing,440.82,Discover 220 | 2012-03-29 10:18:00,Wichita,Women's Clothing,326.12,Discover 221 | 2012-10-21 12:24:00,Corpus Christi,Pet Supplies,210.34,Cash 222 | 2012-02-26 10:20:00,Lubbock,Computers,293.44,Visa 223 | 2012-10-14 14:32:00,Houston,CDs,429.96,Discover 224 | 2012-04-22 17:25:00,Tampa,Cameras,407.57,Cash 225 | 2012-10-12 12:29:00,Baton Rouge,Crafts,428.95,Cash 226 | 2012-05-12 16:39:00,Oklahoma City,Cameras,112.02,Amex 227 | 2012-09-19 15:14:00,St. Louis,Toys,57.76,Discover 228 | 2012-08-13 15:23:00,Henderson,Women's Clothing,270.27,Amex 229 | 2012-07-25 14:59:00,San Antonio,Men's Clothing,123.39,MasterCard 230 | 2012-07-11 15:05:00,Omaha,Garden,231.04,Visa 231 | 2012-04-05 11:21:00,Anchorage,Music,435.9,Discover 232 | 2012-11-14 17:05:00,Wichita,Health and Beauty,115.15,Cash 233 | 2012-06-29 16:24:00,Boston,Video Games,57.05,Cash 234 | 2012-04-11 14:58:00,Jersey City,Baby,10.6,Cash 235 | 2012-04-05 15:35:00,Lexington,Toys,352.61,Cash 236 | 2012-12-20 15:38:00,Lexington,Video Games,396.1,Cash 237 | 2012-12-04 12:26:00,Anaheim,Crafts,467.07,Visa 238 | 2012-03-27 15:47:00,San Francisco,Garden,191.02,Visa 239 | 2012-05-26 15:36:00,Tulsa,Video Games,343.63,Amex 240 | 2012-12-27 16:06:00,Winston–Salem,Health and Beauty,427.79,MasterCard 241 | 2012-05-28 09:15:00,El Paso,Video Games,199.69,Amex 242 | 2012-03-17 16:02:00,Jersey City,Women's Clothing,352.89,MasterCard 243 | 2012-06-29 10:59:00,Indianapolis,Computers,47.13,Cash 244 | 2012-02-23 17:09:00,Corpus Christi,Sporting Goods,398.15,MasterCard 245 | 2012-05-26 12:50:00,Baton Rouge,Video Games,266.96,Amex 246 | 2012-11-21 12:44:00,Anaheim,Music,123.76,Discover 247 | 2012-06-18 10:22:00,Charlotte,CDs,413.72,Discover 248 | 2012-05-17 17:53:00,Anchorage,CDs,294.23,Visa 249 | 2012-07-04 11:00:00,Stockton,Cameras,472.99,Visa 250 | 2012-05-06 15:46:00,Denver,Crafts,441.56,Amex 251 | 2012-07-12 15:42:00,Laredo,Pet Supplies,155.92,MasterCard 252 | 2012-06-05 14:58:00,Stockton,Crafts,77.89,MasterCard 253 | 2012-02-25 16:25:00,St. Petersburg,Garden,129.99,MasterCard 254 | 2012-01-30 16:35:00,Virginia Beach,Children's Clothing,365.55,Amex 255 | 2012-12-28 14:07:00,Tampa,Baby,10.07,Discover 256 | 2012-03-24 13:24:00,Garland,Computers,489.31,Visa 257 | 2012-03-13 16:35:00,Irvine,Books,12.3,MasterCard 258 | 2012-05-22 13:53:00,Louisville,CDs,372.72,Cash 259 | 2012-07-24 10:18:00,Saint Paul,Children's Clothing,439.94,Visa 260 | 2012-08-06 10:57:00,Anaheim,Computers,327.74,Discover 261 | 2012-11-30 15:47:00,Greensboro,Sporting Goods,191.68,Cash 262 | 2012-11-10 10:29:00,Norfolk,Pet Supplies,334.42,Discover 263 | 2012-09-11 12:26:00,Stockton,Sporting Goods,99.66,Amex 264 | 2012-10-08 12:52:00,Anaheim,Sporting Goods,324.6,Amex 265 | 2012-06-26 12:05:00,Sacramento,Video Games,420.59,Visa 266 | 2012-11-14 15:43:00,Detroit,Health and Beauty,472.64,Discover 267 | 2012-11-28 17:33:00,Boise,Garden,130.74,Amex 268 | 2012-05-31 13:20:00,Charlotte,Books,490.6,Discover 269 | 2012-11-23 16:17:00,Norfolk,Sporting Goods,265.18,Cash 270 | 2012-10-11 10:12:00,Newark,Sporting Goods,308.82,Amex 271 | 2012-10-24 14:41:00,Corpus Christi,Pet Supplies,477.58,Discover 272 | 2012-04-22 10:53:00,Portland,CDs,101.51,Discover 273 | 2012-09-20 13:53:00,Chicago,Toys,32.51,Discover 274 | 2012-11-12 17:31:00,Indianapolis,Computers,134.63,Amex 275 | 2012-11-27 15:49:00,San Antonio,Pet Supplies,447.61,Amex 276 | 2012-03-18 13:33:00,Glendale,Computers,371.94,MasterCard 277 | 2012-05-02 16:17:00,Winston–Salem,Crafts,457.22,MasterCard 278 | 2012-04-08 11:51:00,Rochester,Books,257.89,Cash 279 | 2012-03-29 09:42:00,Omaha,Health and Beauty,200.84,Discover 280 | 2012-09-11 14:36:00,Norfolk,Men's Clothing,11.61,Amex 281 | 2012-08-24 17:27:00,Milwaukee,Computers,323.34,Visa 282 | 2012-05-23 13:00:00,Gilbert,Pet Supplies,76.5,Cash 283 | 2012-04-05 17:45:00,Kansas City,Sporting Goods,215.44,Amex 284 | 2012-10-16 09:54:00,San Antonio,Video Games,81.62,Amex 285 | 2012-12-08 12:39:00,Atlanta,Video Games,333.45,Cash 286 | 2012-12-04 09:26:00,Minneapolis,Pet Supplies,334.47,Visa 287 | 2012-02-19 13:28:00,Laredo,Computers,58.01,Amex 288 | 2012-03-31 09:26:00,Cleveland,Cameras,256.11,Cash 289 | 2012-12-14 09:34:00,Glendale,DVDs,150.01,Discover 290 | 2012-06-22 15:57:00,Chicago,Sporting Goods,43.43,Amex 291 | 2012-07-31 14:40:00,Nashville,CDs,316.47,MasterCard 292 | 2012-10-12 10:42:00,Buffalo,Garden,154.73,Amex 293 | 2012-11-23 12:13:00,Albuquerque,Video Games,134.67,Discover 294 | 2012-07-08 11:41:00,Portland,Computers,402.36,Amex 295 | 2012-04-17 10:31:00,Milwaukee,Men's Clothing,499.5,Discover 296 | 2012-06-25 11:22:00,Garland,Music,286.47,Visa 297 | 2012-03-16 15:26:00,Fort Worth,Consumer Electronics,35.27,Cash 298 | 2012-04-06 13:32:00,Baton Rouge,Health and Beauty,404.19,Visa 299 | 2012-12-22 13:04:00,Greensboro,Books,407.26,Visa 300 | 2012-12-21 14:31:00,Tucson,Garden,426.57,Cash 301 | 2012-05-07 09:44:00,Irving,Children's Clothing,221.24,Amex 302 | 2012-03-25 15:02:00,Virginia Beach,Music,100.61,Visa 303 | 2012-12-10 13:58:00,Henderson,Women's Clothing,350.33,Visa 304 | 2012-10-13 16:14:00,San Jose,Toys,181.37,Cash 305 | 2012-09-09 13:50:00,Boise,Toys,86.08,Visa 306 | 2012-10-10 15:13:00,Stockton,Baby,104.02,Cash 307 | 2012-02-13 10:10:00,Irving,Music,300.65,Amex 308 | 2012-08-23 17:23:00,Memphis,Books,313.42,Amex 309 | 2012-01-12 09:51:00,San Francisco,Books,333.92,Discover 310 | 2012-08-09 13:45:00,El Paso,Garden,449.62,Amex 311 | 2012-11-09 15:32:00,El Paso,Pet Supplies,97.52,Discover 312 | 2012-12-06 14:39:00,Buffalo,DVDs,491.98,Visa 313 | 2012-11-30 10:22:00,Long Beach,Sporting Goods,85.9,Cash 314 | 2012-08-31 14:03:00,Laredo,Health and Beauty,185.85,Cash 315 | 2012-06-01 15:12:00,Cleveland,Women's Clothing,128.48,MasterCard 316 | 2012-07-07 09:09:00,Riverside,Books,105.42,Amex 317 | 2012-04-07 12:11:00,San Diego,Consumer Electronics,224.34,Discover 318 | 2012-05-07 13:35:00,Buffalo,Cameras,7.97,Visa 319 | 2012-02-07 11:26:00,Chandler,Music,131.21,Amex 320 | 2012-03-27 17:13:00,Garland,DVDs,23.54,MasterCard 321 | 2012-09-27 15:47:00,Nashville,Men's Clothing,492.62,Cash 322 | 2012-12-16 14:07:00,Lincoln,Baby,403.11,Discover 323 | 2012-12-06 12:03:00,Oklahoma City,Men's Clothing,340.41,Discover 324 | 2012-09-25 13:43:00,El Paso,Consumer Electronics,129.04,Discover 325 | 2012-04-23 12:01:00,St. Petersburg,Video Games,365.52,MasterCard 326 | 2012-04-30 15:00:00,Aurora,Men's Clothing,371.68,Amex 327 | 2012-10-13 16:23:00,Lincoln,Video Games,238.94,MasterCard 328 | 2012-10-10 11:14:00,Irving,Children's Clothing,19.21,Amex 329 | 2012-05-18 09:53:00,Plano,Cameras,75.35,Visa 330 | 2012-10-17 17:06:00,Tampa,Toys,284.71,Amex 331 | 2012-04-21 14:56:00,Santa Ana,DVDs,388.93,Visa 332 | 2012-02-19 10:54:00,San Francisco,Health and Beauty,471,Cash 333 | 2012-06-24 14:49:00,El Paso,Health and Beauty,243.77,Cash 334 | 2012-05-01 10:06:00,Milwaukee,Cameras,155.79,Visa 335 | 2012-10-21 17:11:00,Chicago,Baby,409.67,Visa 336 | 2012-08-09 16:38:00,Honolulu,Women's Clothing,260.85,Cash 337 | 2012-10-11 15:03:00,Henderson,Women's Clothing,6.74,Amex 338 | 2012-07-06 12:17:00,Corpus Christi,Consumer Electronics,114.64,Discover 339 | 2012-08-25 12:11:00,Miami,Sporting Goods,35.82,Cash 340 | 2012-07-03 13:36:00,Gilbert,Children's Clothing,231.37,MasterCard 341 | 2012-08-27 13:48:00,Charlotte,CDs,330.95,Cash 342 | 2012-10-27 10:09:00,Boston,Children's Clothing,273.06,Amex 343 | 2012-05-17 15:33:00,Las Vegas,DVDs,447.56,Visa 344 | 2012-08-24 16:23:00,Miami,Women's Clothing,346.64,Amex 345 | 2012-09-22 09:06:00,Fort Wayne,Pet Supplies,488.5,Amex 346 | 2012-05-14 15:50:00,Detroit,Sporting Goods,109.21,Visa 347 | 2012-12-07 13:50:00,Phoenix,Consumer Electronics,126.7,Discover 348 | 2012-07-19 09:21:00,Garland,Books,175.38,Amex 349 | 2012-06-14 11:20:00,Newark,Sporting Goods,392.49,MasterCard 350 | 2012-04-17 16:35:00,Corpus Christi,Pet Supplies,162.77,MasterCard 351 | 2012-10-04 13:05:00,Indianapolis,Music,440.85,MasterCard 352 | 2012-07-04 16:10:00,Boise,Men's Clothing,14.66,Discover 353 | 2012-08-02 10:56:00,Aurora,DVDs,299.35,Visa 354 | 2012-08-24 12:18:00,Oklahoma City,DVDs,273.16,MasterCard 355 | 2012-01-24 13:36:00,Columbus,Video Games,64.15,Cash 356 | 2012-04-07 12:33:00,Mesa,Video Games,182.97,Amex 357 | 2012-10-08 12:33:00,Birmingham,Music,351.76,MasterCard 358 | 2012-03-11 12:22:00,Charlotte,Garden,125.29,MasterCard 359 | 2012-09-23 15:52:00,Las Vegas,Toys,215.91,Visa 360 | 2012-10-28 10:02:00,Gilbert,Children's Clothing,58.58,Amex 361 | 2012-04-05 10:34:00,Baton Rouge,Health and Beauty,377.11,MasterCard 362 | 2012-03-04 17:31:00,Louisville,Consumer Electronics,129.06,Amex 363 | 2012-03-20 14:51:00,Fort Worth,Toys,1.11,Amex 364 | 2012-10-18 16:41:00,Jacksonville,Consumer Electronics,37.88,Amex 365 | 2012-11-03 15:22:00,Houston,Computers,422.39,Cash 366 | 2012-02-07 16:43:00,Portland,Consumer Electronics,425.99,Amex 367 | 2012-09-22 12:31:00,Kansas City,Books,174.19,MasterCard 368 | 2012-06-10 09:15:00,Fort Worth,Children's Clothing,473.04,MasterCard 369 | 2012-03-21 17:40:00,Chicago,Men's Clothing,71.49,MasterCard 370 | 2012-01-21 09:11:00,Fremont,Music,480.02,Discover 371 | 2012-09-21 12:38:00,Madison,CDs,185.24,Discover 372 | 2012-11-20 13:33:00,New York,Video Games,58.38,Discover 373 | 2012-01-03 13:22:00,Tampa,Toys,24.55,Cash 374 | 2012-03-17 10:40:00,Honolulu,Garden,268.16,Amex 375 | 2012-09-04 15:43:00,Baltimore,Sporting Goods,322.51,Visa 376 | 2012-05-05 14:12:00,Long Beach,Baby,97.53,Cash 377 | 2012-06-23 11:55:00,Colorado Springs,Children's Clothing,177.95,Amex 378 | 2012-11-28 10:14:00,Dallas,Pet Supplies,160.69,Amex 379 | 2012-09-02 13:21:00,Kansas City,Health and Beauty,386.1,Visa 380 | 2012-10-12 13:50:00,Orlando,Health and Beauty,491.16,MasterCard 381 | 2012-11-01 14:02:00,Lincoln,CDs,177.19,MasterCard 382 | 2012-11-02 16:38:00,Saint Paul,Sporting Goods,348.66,MasterCard 383 | 2012-06-23 15:34:00,Colorado Springs,Baby,85.64,Visa 384 | 2012-10-03 11:56:00,Saint Paul,Baby,268.07,MasterCard 385 | 2012-05-17 16:52:00,Riverside,Health and Beauty,13,Visa 386 | 2012-01-11 17:34:00,Fort Wayne,Computers,473.04,Discover 387 | 2012-08-06 10:56:00,Arlington,Women's Clothing,89.57,Amex 388 | 2012-11-18 12:34:00,New Orleans,Health and Beauty,0.45,Visa 389 | 2012-12-03 13:52:00,Fresno,Health and Beauty,153.87,Discover 390 | 2012-07-29 09:15:00,Mesa,Pet Supplies,479,Cash 391 | 2012-10-19 09:15:00,Henderson,Computers,48.76,Visa 392 | 2012-02-19 12:10:00,Charlotte,Toys,460.67,Amex 393 | 2012-06-13 17:20:00,Fresno,Women's Clothing,198.5,Visa 394 | 2012-01-19 12:39:00,Greensboro,Books,180.88,Amex 395 | 2012-02-20 14:58:00,San Diego,Garden,220.45,Visa 396 | 2012-05-01 14:59:00,Laredo,Books,51.88,Discover 397 | 2012-12-30 13:52:00,Baton Rouge,Pet Supplies,167.33,Discover 398 | 2012-07-22 16:01:00,Garland,Men's Clothing,34.25,Cash 399 | 2012-10-15 13:02:00,Honolulu,Women's Clothing,481.65,Discover 400 | 2012-08-09 15:49:00,St. Louis,Health and Beauty,446.89,Cash 401 | 2012-11-04 15:40:00,Hialeah,Music,44.49,Amex 402 | 2012-05-11 12:35:00,Philadelphia,Cameras,330.63,Visa 403 | 2012-04-19 13:57:00,Louisville,Cameras,86.59,Cash 404 | 2012-04-24 16:48:00,Dallas,Crafts,345.58,MasterCard 405 | 2012-10-16 15:43:00,Toledo,Music,483.1,Amex 406 | 2012-08-22 13:41:00,El Paso,Women's Clothing,177.55,MasterCard 407 | 2012-01-20 12:45:00,St. Louis,Women's Clothing,127.04,MasterCard 408 | 2012-05-18 12:54:00,Pittsburgh,Pet Supplies,77.97,Visa 409 | 2012-08-16 11:56:00,Baton Rouge,CDs,122.56,Cash 410 | 2012-04-10 09:44:00,Corpus Christi,Computers,45.64,Amex 411 | 2012-04-23 14:05:00,Madison,Women's Clothing,119.19,Cash 412 | 2012-12-15 09:33:00,Winston–Salem,Baby,418.41,Discover 413 | 2012-07-20 16:40:00,Sacramento,Sporting Goods,269.41,Amex 414 | 2012-07-13 10:44:00,Laredo,Garden,255.29,Amex 415 | 2012-10-20 15:57:00,Arlington,Books,391.94,Cash 416 | 2012-07-26 09:40:00,Sacramento,Video Games,396.4,Visa 417 | 2012-08-28 15:03:00,Boise,Cameras,288.47,MasterCard 418 | 2012-12-25 11:51:00,Durham,DVDs,169.33,Cash 419 | 2012-08-16 17:06:00,Jacksonville,Crafts,254.76,Visa 420 | 2012-09-25 12:26:00,Omaha,Baby,403.89,Cash 421 | 2012-09-22 12:45:00,St. Louis,Computers,238.87,Amex 422 | 2012-08-20 10:06:00,Jacksonville,Children's Clothing,291.15,Amex 423 | 2012-12-01 10:37:00,Jacksonville,Consumer Electronics,217.48,Amex 424 | 2012-09-29 16:34:00,Tampa,Health and Beauty,480.38,Amex 425 | 2012-12-07 14:25:00,Bakersfield,Sporting Goods,441.34,Amex 426 | 2012-06-10 11:25:00,El Paso,Computers,314.43,Cash 427 | 2012-04-09 12:10:00,Toledo,Baby,16.93,Amex 428 | 2012-02-18 09:34:00,Fresno,CDs,236.35,MasterCard 429 | 2012-03-21 11:37:00,Tulsa,Video Games,480.58,MasterCard 430 | 2012-01-10 11:09:00,Colorado Springs,Music,451.78,Discover 431 | 2012-12-08 13:35:00,St. Petersburg,Baby,10.02,MasterCard 432 | 2012-12-14 15:07:00,Tampa,Men's Clothing,337.89,Amex 433 | 2012-11-11 14:41:00,Wichita,CDs,125.09,MasterCard 434 | 2012-06-05 13:02:00,Bakersfield,Children's Clothing,306.14,Visa 435 | 2012-06-06 16:32:00,Aurora,Music,391.07,Visa 436 | 2012-11-24 09:55:00,Boston,Music,30.79,Amex 437 | 2012-01-05 16:41:00,Indianapolis,Children's Clothing,390.06,Amex 438 | 2012-07-27 17:39:00,San Diego,Men's Clothing,190.56,Cash 439 | 2012-08-07 15:27:00,Los Angeles,Video Games,270.74,Cash 440 | 2012-01-10 09:36:00,Austin,Baby,317.7,MasterCard 441 | 2012-06-10 11:28:00,North Las Vegas,Toys,235.92,Discover 442 | 2012-06-16 11:20:00,Chesapeake,Pet Supplies,373,Discover 443 | 2012-05-24 12:47:00,San Jose,Crafts,233.14,Visa 444 | 2012-07-29 16:52:00,Anaheim,Books,175.75,Amex 445 | 2012-04-15 14:07:00,Cleveland,Music,150.21,Cash 446 | 2012-12-01 12:20:00,Tampa,CDs,209.96,Visa 447 | 2012-05-21 09:09:00,El Paso,Crafts,379.63,MasterCard 448 | 2012-04-30 13:36:00,Miami,Toys,318.06,MasterCard 449 | 2012-08-04 12:25:00,Fort Wayne,Video Games,109.32,Cash 450 | 2012-11-30 12:02:00,Santa Ana,Toys,366.8,Cash 451 | 2012-03-12 12:13:00,Nashville,Men's Clothing,392.83,MasterCard 452 | 2012-05-07 12:30:00,Tampa,Women's Clothing,408.31,Discover 453 | 2012-06-15 13:44:00,Baton Rouge,Consumer Electronics,182,Amex 454 | 2012-02-08 14:02:00,Omaha,Health and Beauty,474.01,Cash 455 | 2012-03-16 11:52:00,Chicago,Video Games,473.95,Visa 456 | 2012-06-17 17:27:00,Madison,Crafts,262.01,Visa 457 | 2012-05-23 10:56:00,Portland,DVDs,232.82,Discover 458 | 2012-01-22 16:14:00,Glendale,Music,313.97,Discover 459 | 2012-12-25 14:41:00,Indianapolis,Men's Clothing,220.23,Cash 460 | 2012-12-03 17:04:00,Richmond,Sporting Goods,159.73,Amex 461 | 2012-04-24 10:38:00,Cleveland,Children's Clothing,347.28,MasterCard 462 | 2012-03-23 14:29:00,Charlotte,Crafts,325.66,Cash 463 | 2012-02-10 10:40:00,North Las Vegas,Cameras,439.3,Visa 464 | 2012-07-15 13:49:00,Detroit,Garden,379.34,MasterCard 465 | 2012-04-28 09:14:00,Hialeah,Health and Beauty,15.74,Amex 466 | 2012-09-12 12:57:00,Baltimore,Baby,343.68,MasterCard 467 | 2012-09-16 17:07:00,Memphis,DVDs,281.36,Cash 468 | 2012-02-01 14:59:00,Saint Paul,Consumer Electronics,334.01,Amex 469 | 2012-11-06 17:32:00,Sacramento,Crafts,266.09,Cash 470 | 2012-04-25 17:23:00,Greensboro,Video Games,253.36,Visa 471 | 2012-02-25 15:09:00,Louisville,Children's Clothing,220.61,Visa 472 | 2012-02-09 16:13:00,Henderson,CDs,159.46,MasterCard 473 | 2012-04-25 10:27:00,Bakersfield,Books,365.05,MasterCard 474 | 2012-08-25 12:41:00,Scottsdale,Children's Clothing,85.47,Visa 475 | 2012-03-17 11:54:00,Omaha,Books,288.19,Discover 476 | 2012-03-24 10:17:00,Oklahoma City,CDs,347.7,Visa 477 | 2012-02-28 13:09:00,Greensboro,Computers,62.75,Discover 478 | 2012-05-10 12:15:00,Gilbert,Crafts,423.87,Discover 479 | 2012-01-31 12:58:00,Wichita,Consumer Electronics,266.24,MasterCard 480 | 2012-03-10 10:55:00,Tulsa,DVDs,328.73,Discover 481 | 2012-03-10 13:37:00,San Bernardino,Garden,135.15,Amex 482 | 2012-03-01 10:56:00,Fort Worth,Consumer Electronics,386.24,Amex 483 | 2012-12-12 16:00:00,Pittsburgh,Children's Clothing,452.8,MasterCard 484 | 2012-06-06 11:47:00,Omaha,Books,166.12,Cash 485 | 2012-05-11 14:18:00,Omaha,Garden,189.82,Visa 486 | 2012-05-02 16:23:00,Anaheim,Sporting Goods,284.42,Amex 487 | 2012-08-24 15:10:00,Chula Vista,Crafts,242.12,MasterCard 488 | 2012-08-03 09:38:00,Plano,Women's Clothing,2.25,Cash 489 | 2012-08-05 10:35:00,Laredo,Sporting Goods,241.82,Visa 490 | 2012-05-13 12:22:00,New York,Women's Clothing,107.89,Visa 491 | 2012-07-20 17:51:00,San Jose,Women's Clothing,263.73,MasterCard 492 | 2012-12-25 11:57:00,Tulsa,CDs,352.53,Cash 493 | 2012-12-07 10:12:00,Glendale,Women's Clothing,112.07,MasterCard 494 | 2012-06-14 16:41:00,Corpus Christi,Men's Clothing,416.71,Amex 495 | 2012-10-14 12:00:00,Chula Vista,Cameras,148.86,Discover 496 | 2012-10-11 16:34:00,Saint Paul,Toys,217.13,Visa 497 | 2012-06-08 10:58:00,Los Angeles,Crafts,244.95,Amex 498 | 2012-03-15 13:24:00,Glendale,Video Games,476.33,Cash 499 | 2012-10-22 12:13:00,Chicago,Pet Supplies,245.88,MasterCard 500 | 2012-11-23 15:21:00,Irvine,Baby,224.18,Cash 501 | 2012-09-22 09:21:00,Reno,Children's Clothing,395.36,Discover 502 | 2012-08-09 16:14:00,Chesapeake,Consumer Electronics,201.59,Amex 503 | 2012-10-30 16:03:00,Washington,CDs,458.85,Visa 504 | 2012-09-07 15:53:00,Saint Paul,DVDs,328.15,Cash 505 | 2012-09-13 10:08:00,Virginia Beach,Music,409.63,MasterCard 506 | 2012-11-12 12:29:00,Corpus Christi,Music,246.84,Amex 507 | 2012-06-13 10:47:00,Wichita,Women's Clothing,247.3,MasterCard 508 | 2012-08-05 17:38:00,Albuquerque,Baby,41.78,MasterCard 509 | 2012-08-11 11:10:00,Garland,Toys,177.08,MasterCard 510 | 2012-02-19 14:47:00,Santa Ana,Women's Clothing,248.54,Amex 511 | 2012-07-17 16:34:00,Oklahoma City,Computers,82.5,Discover 512 | 2012-02-27 16:37:00,Gilbert,Women's Clothing,450.32,Visa 513 | 2012-03-17 13:19:00,Los Angeles,Men's Clothing,315.6,MasterCard 514 | 2012-08-15 13:08:00,Milwaukee,Cameras,306.15,Visa 515 | 2012-11-09 13:28:00,Santa Ana,Video Games,372.05,MasterCard 516 | 2012-04-24 13:40:00,Pittsburgh,Children's Clothing,265.84,Visa 517 | 2012-12-28 16:21:00,El Paso,Baby,267.64,Cash 518 | 2012-12-26 16:05:00,Phoenix,Health and Beauty,175.98,MasterCard 519 | 2012-08-22 14:50:00,Charlotte,Children's Clothing,176.32,Amex 520 | 2012-05-07 15:01:00,Toledo,Music,289.16,MasterCard 521 | 2012-10-26 09:37:00,North Las Vegas,CDs,20.61,MasterCard 522 | 2012-03-12 11:13:00,San Francisco,Garden,34,Discover 523 | 2012-01-05 12:30:00,Tampa,Women's Clothing,142.38,Cash 524 | 2012-12-30 11:56:00,Austin,Cameras,28.83,Amex 525 | 2012-08-02 12:42:00,Las Vegas,Health and Beauty,400.95,Amex 526 | 2012-07-08 15:18:00,Columbus,Books,288.8,Cash 527 | 2012-01-16 13:30:00,Gilbert,Women's Clothing,380.3,Visa 528 | 2012-10-31 11:24:00,Boston,Baby,425.23,Amex 529 | 2012-08-25 12:51:00,Tulsa,Garden,173.2,Amex 530 | 2012-01-10 16:07:00,Arlington,Men's Clothing,34.39,Cash 531 | 2012-12-06 11:56:00,Winston–Salem,Cameras,201.45,Amex 532 | 2012-06-24 15:26:00,Garland,Consumer Electronics,354.83,Amex 533 | 2012-10-29 11:10:00,Philadelphia,CDs,360.51,Cash 534 | 2012-05-02 12:53:00,Austin,Video Games,110.29,Discover 535 | 2012-10-16 13:29:00,Durham,Garden,278.02,Discover 536 | 2012-07-17 11:29:00,Durham,Women's Clothing,26.31,Discover 537 | 2012-11-01 16:26:00,San Bernardino,Pet Supplies,175.64,Amex 538 | 2012-10-01 11:56:00,Gilbert,Health and Beauty,192.44,Amex 539 | 2012-11-28 11:28:00,El Paso,Children's Clothing,5.48,Cash 540 | 2012-12-17 11:35:00,Anaheim,Women's Clothing,466.12,Cash 541 | 2012-09-16 11:14:00,Newark,Baby,238.19,Visa 542 | 2012-11-21 10:55:00,Miami,Health and Beauty,132.94,Cash 543 | 2012-09-08 09:40:00,Fort Wayne,Toys,248.15,Cash 544 | 2012-05-21 12:36:00,Tampa,Garden,144.52,Discover 545 | 2012-05-01 10:55:00,Orlando,Music,24.58,MasterCard 546 | 2012-09-16 11:03:00,Irvine,Crafts,35.17,MasterCard 547 | 2012-04-22 16:18:00,Toledo,Baby,371.26,Cash 548 | 2012-02-23 16:25:00,Corpus Christi,DVDs,380.35,MasterCard 549 | 2012-08-19 09:19:00,Miami,Sporting Goods,385.66,Visa 550 | 2012-01-08 12:53:00,St. Louis,Music,45.24,Discover 551 | 2012-03-24 15:40:00,Miami,Cameras,98.78,MasterCard 552 | 2012-06-23 16:29:00,Pittsburgh,Baby,488.22,Amex 553 | 2012-06-14 11:25:00,Seattle,Cameras,232.19,Discover 554 | 2012-09-10 15:31:00,Honolulu,Pet Supplies,86.86,MasterCard 555 | 2012-11-20 17:20:00,Hialeah,Health and Beauty,77.67,Visa 556 | 2012-08-19 11:03:00,Newark,Men's Clothing,206.62,MasterCard 557 | 2012-03-17 15:57:00,Sacramento,Health and Beauty,251.17,Cash 558 | 2012-01-05 14:13:00,Henderson,Crafts,51.6,MasterCard 559 | 2012-08-12 15:30:00,Tampa,Women's Clothing,140.43,MasterCard 560 | 2012-07-05 11:00:00,Chicago,Music,229.49,Cash 561 | 2012-02-15 17:23:00,Houston,Consumer Electronics,196.72,MasterCard 562 | 2012-05-25 15:12:00,San Bernardino,Baby,241.74,Amex 563 | 2012-04-28 14:58:00,Birmingham,Health and Beauty,317.53,MasterCard 564 | 2012-10-27 17:16:00,Portland,Books,169.26,Discover 565 | 2012-07-13 13:36:00,Raleigh,Baby,450.05,Amex 566 | 2012-12-06 16:23:00,Laredo,Women's Clothing,327.32,Amex 567 | 2012-04-09 10:11:00,Minneapolis,Crafts,93.29,Cash 568 | 2012-02-01 16:13:00,Fresno,Music,478.75,Amex 569 | 2012-04-28 16:49:00,Minneapolis,Video Games,460.11,Cash 570 | 2012-08-21 13:05:00,Greensboro,Garden,248.65,Cash 571 | 2012-09-28 13:09:00,Raleigh,Crafts,167.47,MasterCard 572 | 2012-12-29 16:41:00,Fort Worth,CDs,451.93,Cash 573 | 2012-06-20 13:19:00,Raleigh,Music,103.04,MasterCard 574 | 2012-08-10 09:08:00,Albuquerque,Consumer Electronics,118.28,Amex 575 | 2012-10-26 11:03:00,Anchorage,Consumer Electronics,426.03,Discover 576 | 2012-12-23 12:00:00,Richmond,Video Games,330.45,Visa 577 | 2012-04-19 14:54:00,Dallas,Men's Clothing,279.88,MasterCard 578 | 2012-03-01 11:12:00,Rochester,Garden,176.29,Amex 579 | 2012-04-26 10:30:00,Winston–Salem,DVDs,192.22,Discover 580 | 2012-12-30 17:07:00,Rochester,Books,168.15,Visa 581 | 2012-11-22 12:30:00,Washington,Books,18.86,Cash 582 | 2012-09-14 13:25:00,Tucson,CDs,397.28,MasterCard 583 | 2012-04-04 13:59:00,Omaha,Cameras,92.81,Visa 584 | 2012-05-26 11:15:00,Indianapolis,Music,158.25,Cash 585 | 2012-11-05 10:03:00,Charlotte,Garden,352.93,Cash 586 | 2012-11-22 10:27:00,Reno,Baby,208.73,Visa 587 | 2012-03-09 11:17:00,New Orleans,Toys,32.73,Discover 588 | 2012-07-20 12:31:00,Garland,Video Games,43.2,Amex 589 | 2012-09-29 10:13:00,Arlington,Baby,468.7,Amex 590 | 2012-08-22 11:31:00,Austin,Music,215.41,Cash 591 | 2012-11-21 15:36:00,Detroit,CDs,485.97,Cash 592 | 2012-09-27 16:04:00,New York,Health and Beauty,173.7,Visa 593 | 2012-06-20 14:16:00,Louisville,Cameras,373.72,Amex 594 | 2012-02-19 15:07:00,Las Vegas,Baby,330.42,MasterCard 595 | 2012-08-31 10:13:00,Jacksonville,Cameras,115.47,MasterCard 596 | 2012-08-24 16:23:00,Madison,Men's Clothing,87.55,Cash 597 | 2012-04-19 11:29:00,Stockton,Health and Beauty,45.35,Visa 598 | 2012-06-13 14:09:00,Wichita,DVDs,242.4,Amex 599 | 2012-03-07 13:45:00,Mesa,Health and Beauty,48.61,Amex 600 | 2012-09-01 09:32:00,Irvine,Computers,385.23,Visa 601 | 2012-01-29 16:14:00,Indianapolis,Women's Clothing,343.12,Cash 602 | 2012-11-24 12:52:00,Gilbert,Crafts,208.06,MasterCard 603 | 2012-08-18 17:55:00,Baltimore,Toys,36.37,Discover 604 | 2012-02-11 15:50:00,Laredo,Computers,341.32,MasterCard 605 | 2012-02-14 15:01:00,Madison,Cameras,75.51,Amex 606 | 2012-01-14 11:52:00,Washington,Health and Beauty,28.26,Discover 607 | 2012-05-16 11:48:00,Indianapolis,Consumer Electronics,457.31,MasterCard 608 | 2012-09-18 17:47:00,San Francisco,Children's Clothing,198.12,Amex 609 | 2012-03-08 09:22:00,Albuquerque,Cameras,354.05,Discover 610 | 2012-04-23 16:39:00,San Jose,Children's Clothing,401.87,Visa 611 | 2012-09-02 14:11:00,Portland,Video Games,1.51,Visa 612 | 2012-03-09 13:29:00,Jersey City,DVDs,320.64,MasterCard 613 | 2012-06-28 17:37:00,Colorado Springs,Books,104.36,Cash 614 | 2012-01-19 14:11:00,Los Angeles,DVDs,261.26,Visa 615 | 2012-05-16 13:16:00,Lincoln,Toys,23.68,MasterCard 616 | 2012-12-30 09:28:00,San Diego,Video Games,203.57,Discover 617 | 2012-05-23 11:17:00,Toledo,Garden,87.99,MasterCard 618 | 2012-05-16 12:12:00,Anchorage,Books,240.51,Visa 619 | 2012-02-24 11:28:00,Bakersfield,Children's Clothing,182.29,Visa 620 | 2012-04-26 12:15:00,Honolulu,Garden,48.38,Cash 621 | 2012-09-03 13:12:00,Jersey City,Men's Clothing,499.42,Discover 622 | 2012-05-06 10:41:00,Oakland,Pet Supplies,30.67,MasterCard 623 | 2012-08-31 16:22:00,Louisville,Women's Clothing,213.39,Visa 624 | 2012-12-27 13:31:00,Kansas City,Women's Clothing,26.33,MasterCard 625 | 2012-03-17 13:26:00,San Diego,Books,373.55,Amex 626 | 2012-10-26 09:19:00,Miami,Pet Supplies,499.58,MasterCard 627 | 2012-04-28 17:24:00,North Las Vegas,Men's Clothing,215.04,Visa 628 | 2012-11-19 10:09:00,Greensboro,Health and Beauty,183.31,MasterCard 629 | 2012-07-14 12:08:00,Laredo,Children's Clothing,200.22,Visa 630 | 2012-08-19 10:19:00,Portland,Music,322.68,Cash 631 | 2012-03-30 14:24:00,Chula Vista,Garden,240.17,Amex 632 | 2012-06-03 09:59:00,Tulsa,Men's Clothing,328.28,Cash 633 | 2012-01-02 17:51:00,Orlando,Cameras,330.75,Cash 634 | 2012-05-19 12:37:00,Colorado Springs,Computers,450.64,Visa 635 | 2012-04-21 09:50:00,Newark,Men's Clothing,473.55,Amex 636 | 2012-05-25 11:49:00,Minneapolis,Computers,193.65,MasterCard 637 | 2012-08-31 15:40:00,Tulsa,DVDs,208.94,Cash 638 | 2012-09-25 16:09:00,Chesapeake,Crafts,250.38,Cash 639 | 2012-04-14 13:18:00,Washington,Children's Clothing,211.96,Amex 640 | 2012-12-27 14:06:00,Austin,Baby,5.9,Amex 641 | 2012-06-20 11:31:00,Toledo,Cameras,44.52,Cash 642 | 2012-03-28 10:30:00,Bakersfield,Women's Clothing,222.75,Visa 643 | 2012-07-31 09:55:00,Dallas,DVDs,90.94,Discover 644 | 2012-02-26 11:04:00,Lincoln,Video Games,303.21,Amex 645 | 2012-11-16 09:38:00,Arlington,Cameras,112.91,Visa 646 | 2012-10-10 15:29:00,Chandler,Books,304.5,Amex 647 | 2012-01-22 10:48:00,Rochester,Cameras,363.81,MasterCard 648 | 2012-11-10 11:45:00,Lexington,Computers,398.24,MasterCard 649 | 2012-08-05 17:47:00,St. Petersburg,Baby,143.65,Discover 650 | 2012-05-17 09:53:00,Winston–Salem,Video Games,191.53,Cash 651 | 2012-06-25 10:58:00,New Orleans,Crafts,24.15,Discover 652 | 2012-08-24 13:47:00,Columbus,CDs,368.66,Visa 653 | 2012-07-09 11:03:00,Chandler,Sporting Goods,134.37,MasterCard 654 | 2012-01-22 11:07:00,Fort Wayne,Toys,329.98,MasterCard 655 | 2012-03-15 09:01:00,Winston–Salem,Cameras,360.17,Amex 656 | 2012-03-16 10:26:00,Atlanta,Computers,490.19,Cash 657 | 2012-11-21 11:09:00,Anaheim,Children's Clothing,78.41,Discover 658 | 2012-10-24 09:44:00,Irvine,Crafts,448.21,Amex 659 | 2012-10-09 11:25:00,Winston–Salem,DVDs,331.26,Discover 660 | 2012-05-06 11:41:00,Fresno,Sporting Goods,168.75,Discover 661 | 2012-05-01 11:24:00,Hialeah,Women's Clothing,70.99,MasterCard 662 | 2012-02-17 10:03:00,Seattle,Crafts,50.34,Discover 663 | 2012-02-12 09:17:00,Norfolk,Crafts,60.21,Discover 664 | 2012-11-27 15:47:00,Oklahoma City,Children's Clothing,67.4,Amex 665 | 2012-01-23 09:37:00,Tulsa,Consumer Electronics,436.14,Cash 666 | 2012-10-03 10:46:00,Irvine,Books,290.95,Discover 667 | 2012-06-18 16:17:00,Cincinnati,Consumer Electronics,341.62,MasterCard 668 | 2012-03-15 14:29:00,Tucson,Baby,368.62,Visa 669 | 2012-09-19 09:30:00,Seattle,Crafts,230.7,MasterCard 670 | 2012-04-14 12:59:00,Mesa,Men's Clothing,218.68,Amex 671 | 2012-06-24 17:23:00,Baltimore,Toys,297.61,Cash 672 | 2012-04-03 14:55:00,Lubbock,Garden,274.09,Cash 673 | 2012-12-13 15:01:00,Arlington,Music,125.26,Cash 674 | 2012-09-11 09:13:00,Denver,Pet Supplies,302.04,Discover 675 | 2012-06-01 15:30:00,Chicago,Pet Supplies,333.89,Cash 676 | 2012-07-04 10:07:00,Mesa,DVDs,36.21,Amex 677 | 2012-11-03 14:04:00,San Diego,CDs,374.16,Discover 678 | 2012-10-01 12:22:00,Buffalo,Sporting Goods,395.94,MasterCard 679 | 2012-05-15 17:48:00,San Francisco,Crafts,449.67,Visa 680 | 2012-09-03 17:07:00,Chandler,Health and Beauty,344.91,Cash 681 | 2012-04-17 13:05:00,Anaheim,Cameras,180.2,Discover 682 | 2012-08-02 14:04:00,Houston,Toys,316.23,Visa 683 | 2012-11-18 09:27:00,Chandler,Computers,281.9,Discover 684 | 2012-10-07 17:38:00,Lubbock,Toys,431.14,Visa 685 | 2012-11-13 12:21:00,Indianapolis,Garden,36.79,Amex 686 | 2012-02-12 17:59:00,Virginia Beach,Video Games,474.81,Discover 687 | 2012-03-01 16:54:00,San Antonio,CDs,409.97,Discover 688 | 2012-04-15 09:26:00,Portland,Music,33.26,MasterCard 689 | 2012-05-21 17:20:00,Colorado Springs,Crafts,443.87,Visa 690 | 2012-09-21 14:29:00,Cleveland,Cameras,60.34,Visa 691 | 2012-06-28 15:06:00,Miami,Baby,436.55,Discover 692 | 2012-11-19 13:03:00,Indianapolis,DVDs,378.35,Discover 693 | 2012-12-17 14:59:00,Birmingham,DVDs,217.13,Amex 694 | 2012-06-24 16:50:00,Atlanta,DVDs,130.97,Discover 695 | 2012-02-18 15:34:00,Milwaukee,Baby,262.22,MasterCard 696 | 2012-10-13 12:33:00,Plano,Sporting Goods,258.44,Discover 697 | 2012-04-01 15:15:00,Norfolk,Toys,46.77,Visa 698 | 2012-03-20 09:42:00,Norfolk,Pet Supplies,444.3,Discover 699 | 2012-10-30 11:17:00,Madison,Women's Clothing,224.68,Discover 700 | 2012-04-20 09:48:00,Kansas City,Consumer Electronics,192.84,Discover 701 | 2012-02-08 09:26:00,Orlando,Health and Beauty,251.08,Cash 702 | 2012-01-17 16:25:00,Anchorage,Women's Clothing,485.64,Amex 703 | 2012-09-10 09:04:00,Birmingham,Sporting Goods,420.17,Cash 704 | 2012-10-10 12:23:00,Detroit,Garden,28.27,Amex 705 | 2012-09-28 16:44:00,Durham,Music,416.04,MasterCard 706 | 2012-03-12 15:27:00,San Diego,Health and Beauty,347.44,Cash 707 | 2012-06-26 11:08:00,New York,Music,471.75,Amex 708 | 2012-07-30 10:15:00,Bakersfield,Pet Supplies,55.4,Visa 709 | 2012-02-28 09:13:00,Tampa,Cameras,384.09,Discover 710 | 2012-12-27 15:24:00,Washington,Crafts,179.15,Visa 711 | 2012-03-14 15:48:00,Mesa,Books,87.83,Discover 712 | 2012-04-20 14:21:00,Toledo,DVDs,239.72,MasterCard 713 | 2012-06-19 15:06:00,Garland,Toys,323.85,MasterCard 714 | 2012-04-10 09:47:00,Albuquerque,Pet Supplies,291.34,Amex 715 | 2012-06-05 12:45:00,Tampa,Men's Clothing,85.1,MasterCard 716 | 2012-05-24 17:20:00,Gilbert,Baby,237.23,Cash 717 | 2012-05-24 17:56:00,Chicago,Crafts,499.99,MasterCard 718 | 2012-11-15 13:23:00,Richmond,Men's Clothing,466.55,Amex 719 | 2012-06-07 12:20:00,Chandler,Consumer Electronics,27.02,Amex 720 | 2012-10-31 16:00:00,Boise,Video Games,346.81,Cash 721 | 2012-03-07 17:34:00,Philadelphia,Books,335.84,Cash 722 | 2012-05-05 11:54:00,Tampa,Men's Clothing,117.05,Amex 723 | 2012-06-03 12:57:00,Winston–Salem,Toys,25.44,Cash 724 | 2012-02-16 14:50:00,Lubbock,Consumer Electronics,158.52,MasterCard 725 | 2012-04-06 13:01:00,Mesa,Music,101.86,Discover 726 | 2012-02-03 14:02:00,Saint Paul,CDs,33.35,Amex 727 | 2012-12-22 13:39:00,San Antonio,Consumer Electronics,112.54,Visa 728 | 2012-08-21 09:23:00,Durham,Men's Clothing,489.87,Amex 729 | 2012-05-09 09:19:00,Gilbert,Books,147.94,Visa 730 | 2012-12-25 16:05:00,New York,Video Games,162.44,Amex 731 | 2012-10-25 09:27:00,Riverside,Toys,424.97,Cash 732 | 2012-05-25 14:01:00,Austin,Toys,486.15,MasterCard 733 | 2012-02-16 13:45:00,Boston,Consumer Electronics,205.34,Amex 734 | 2012-12-30 17:53:00,Atlanta,DVDs,137.43,Cash 735 | 2012-05-01 17:49:00,Hialeah,Crafts,357.06,MasterCard 736 | 2012-12-10 09:46:00,Cincinnati,Crafts,484.8,Discover 737 | 2012-07-31 10:10:00,Anchorage,Women's Clothing,447.11,MasterCard 738 | 2012-01-23 10:17:00,Anaheim,Toys,445.6,MasterCard 739 | 2012-12-20 09:50:00,Louisville,Sporting Goods,306.15,MasterCard 740 | 2012-02-22 15:41:00,Greensboro,Video Games,154.22,Cash 741 | 2012-12-28 10:49:00,Santa Ana,Health and Beauty,101.01,Visa 742 | 2012-03-15 13:04:00,Mesa,Music,478.77,MasterCard 743 | 2012-03-16 16:46:00,Memphis,Books,474.88,Cash 744 | 2012-04-06 09:44:00,Louisville,DVDs,176.07,Visa 745 | 2012-02-04 17:18:00,Orlando,Women's Clothing,483.18,MasterCard 746 | 2012-12-22 09:17:00,Gilbert,Sporting Goods,68.86,Cash 747 | 2012-12-28 14:43:00,Philadelphia,Baby,274.62,Discover 748 | 2012-06-09 16:39:00,Pittsburgh,Baby,450.82,MasterCard 749 | 2012-12-21 09:31:00,Oklahoma City,Children's Clothing,87.5,Discover 750 | 2012-01-25 10:11:00,Kansas City,Toys,0.12,Amex 751 | 2012-11-08 10:40:00,Boston,Pet Supplies,336.62,Visa 752 | 2012-10-13 17:03:00,San Antonio,Women's Clothing,100.44,Visa 753 | 2012-08-10 17:04:00,Scottsdale,Cameras,322.03,Amex 754 | 2012-07-08 09:28:00,Minneapolis,Women's Clothing,52.72,MasterCard 755 | 2012-07-11 16:07:00,Washington,Music,324.43,Amex 756 | 2012-01-18 16:00:00,Chula Vista,Men's Clothing,218.13,MasterCard 757 | 2012-07-01 14:56:00,Seattle,Crafts,308.38,Visa 758 | 2012-07-02 14:07:00,Portland,Video Games,86.09,Discover 759 | 2012-06-06 12:28:00,Houston,Crafts,494.26,Discover 760 | 2012-06-02 14:38:00,Garland,Video Games,467.2,MasterCard 761 | 2012-09-17 10:00:00,San Francisco,Cameras,374.05,MasterCard 762 | 2012-04-30 17:41:00,Cincinnati,Children's Clothing,223.02,Discover 763 | 2012-03-12 12:53:00,Scottsdale,Women's Clothing,406.87,Discover 764 | 2012-08-08 17:24:00,Newark,Toys,147.71,Cash 765 | 2012-03-28 11:51:00,Omaha,Baby,97.23,Amex 766 | 2012-12-20 14:24:00,Orlando,Crafts,119.48,Visa 767 | 2012-08-15 14:52:00,Birmingham,Music,241.14,Cash 768 | 2012-04-27 12:40:00,Miami,Computers,266.84,Cash 769 | 2012-09-23 15:54:00,Henderson,Video Games,205.8,Cash 770 | 2012-12-17 16:00:00,Chesapeake,Children's Clothing,433.77,Discover 771 | 2012-02-09 17:28:00,Minneapolis,Children's Clothing,453.94,Visa 772 | 2012-05-18 16:30:00,Louisville,Crafts,461.37,MasterCard 773 | 2012-06-28 14:36:00,Jersey City,Crafts,247.83,Discover 774 | 2012-05-22 15:09:00,Long Beach,Books,302.75,Amex 775 | 2012-01-22 09:24:00,Birmingham,Music,40.6,Cash 776 | 2012-05-09 14:31:00,Baltimore,Health and Beauty,432.92,MasterCard 777 | 2012-01-17 13:38:00,Stockton,Health and Beauty,65.63,Visa 778 | 2012-12-10 11:11:00,Reno,Health and Beauty,149.1,Discover 779 | 2012-01-25 15:15:00,Long Beach,Video Games,161.64,Discover 780 | 2012-05-24 16:01:00,Minneapolis,Consumer Electronics,293.99,Visa 781 | 2012-06-09 16:25:00,St. Petersburg,Music,473.13,Amex 782 | 2012-11-14 10:59:00,Durham,Garden,150.81,Visa 783 | 2012-03-18 13:31:00,Anaheim,Books,45.99,Visa 784 | 2012-03-01 16:38:00,Lexington,CDs,41.61,Amex 785 | 2012-03-14 16:32:00,Honolulu,Cameras,214.38,Cash 786 | 2012-06-03 16:44:00,Henderson,Toys,464.65,Visa 787 | 2012-03-22 17:38:00,Chicago,Toys,243.5,Amex 788 | 2012-12-18 17:05:00,Minneapolis,Video Games,233.44,Cash 789 | 2012-12-23 17:36:00,Nashville,Computers,295.4,Visa 790 | 2012-10-25 13:11:00,Nashville,Toys,376.8,MasterCard 791 | 2012-10-31 11:34:00,Greensboro,Books,255.46,Discover 792 | 2012-03-11 14:20:00,Cleveland,Health and Beauty,276.37,Cash 793 | 2012-11-28 11:25:00,Rochester,Computers,449.2,Amex 794 | 2012-02-23 10:38:00,Anaheim,Children's Clothing,173.64,Discover 795 | 2012-05-07 09:37:00,Pittsburgh,Music,66.98,Visa 796 | 2012-10-07 12:30:00,Boston,DVDs,113.44,Amex 797 | 2012-09-26 17:24:00,Raleigh,Men's Clothing,302.53,Visa 798 | 2012-11-22 14:10:00,Arlington,DVDs,316.07,Cash 799 | 2012-10-22 13:42:00,Chesapeake,Books,111.25,Discover 800 | 2012-09-03 15:39:00,St. Petersburg,Sporting Goods,296.29,Cash 801 | 2012-05-07 16:35:00,Jacksonville,CDs,258.67,MasterCard 802 | 2012-12-18 16:40:00,Lincoln,Video Games,61.56,MasterCard 803 | 2012-08-14 13:15:00,Charlotte,Music,411.34,Cash 804 | 2012-10-13 13:27:00,Minneapolis,Garden,180.04,Discover 805 | 2012-07-27 09:46:00,Lexington,Sporting Goods,117.9,Discover 806 | 2012-11-16 10:39:00,Riverside,Books,96.81,Cash 807 | 2012-05-17 09:48:00,Chesapeake,Baby,367.01,Amex 808 | 2012-11-30 13:55:00,Chicago,CDs,5.51,Amex 809 | 2012-11-09 17:26:00,Gilbert,Crafts,211.5,MasterCard 810 | 2012-11-10 17:38:00,Tucson,Children's Clothing,293.62,Cash 811 | 2012-08-18 17:18:00,Fremont,Consumer Electronics,43.05,Discover 812 | 2012-05-07 13:44:00,Nashville,Sporting Goods,189.89,Cash 813 | 2012-04-02 15:39:00,Durham,Computers,117.32,MasterCard 814 | 2012-09-07 10:32:00,Seattle,Toys,387.39,Amex 815 | 2012-11-26 10:24:00,Riverside,Crafts,261.29,Visa 816 | 2012-06-22 13:26:00,Boston,Cameras,106.72,Amex 817 | 2012-07-31 17:19:00,Rochester,Cameras,160.2,Discover 818 | 2012-05-22 14:47:00,Corpus Christi,Cameras,261.21,Visa 819 | 2012-06-25 11:33:00,North Las Vegas,Consumer Electronics,432.21,Cash 820 | 2012-02-11 13:44:00,Baltimore,Garden,62.16,Discover 821 | 2012-08-17 11:39:00,Chesapeake,Baby,121.38,Amex 822 | 2012-12-19 12:48:00,Miami,Sporting Goods,454.77,MasterCard 823 | 2012-09-21 11:32:00,San Francisco,Baby,131.97,Cash 824 | 2012-01-30 13:03:00,Omaha,Health and Beauty,432.21,Cash 825 | 2012-06-16 17:00:00,North Las Vegas,Consumer Electronics,0.16,Discover 826 | 2012-02-03 15:07:00,Anchorage,CDs,51.11,Cash 827 | 2012-01-01 09:23:00,Boston,Pet Supplies,321.06,Amex 828 | 2012-05-29 14:19:00,Greensboro,DVDs,255.82,Visa 829 | 2012-03-18 16:32:00,Kansas City,Children's Clothing,99.19,MasterCard 830 | 2012-09-17 17:18:00,Chesapeake,DVDs,281.83,Amex 831 | 2012-02-08 16:17:00,Tucson,Cameras,253.65,Cash 832 | 2012-05-16 12:41:00,Laredo,DVDs,331.37,Cash 833 | 2012-09-08 13:33:00,Miami,Computers,471.21,Amex 834 | 2012-10-03 15:14:00,Madison,Pet Supplies,388.41,Visa 835 | 2012-11-26 16:50:00,Tulsa,Cameras,256.49,Visa 836 | 2012-12-13 16:27:00,Irving,Garden,489.91,Amex 837 | 2012-11-01 10:58:00,Atlanta,DVDs,116.7,MasterCard 838 | 2012-09-08 15:54:00,Sacramento,Health and Beauty,201.54,Cash 839 | 2012-05-25 17:35:00,Henderson,Sporting Goods,350.13,Amex 840 | 2012-04-18 16:04:00,Birmingham,Crafts,250.54,Visa 841 | 2012-03-12 16:06:00,Hialeah,Garden,368.96,Cash 842 | 2012-02-27 17:27:00,Portland,Books,282.11,Amex 843 | 2012-08-16 14:53:00,Rochester,Crafts,304.82,MasterCard 844 | 2012-10-14 17:54:00,Columbus,Sporting Goods,249.47,MasterCard 845 | 2012-02-06 12:53:00,El Paso,Consumer Electronics,200.04,MasterCard 846 | 2012-11-18 17:51:00,Lubbock,Health and Beauty,485.36,MasterCard 847 | 2012-09-27 12:35:00,Phoenix,Health and Beauty,342.49,MasterCard 848 | 2012-08-16 14:43:00,Phoenix,Children's Clothing,380.99,Amex 849 | 2012-06-16 14:47:00,Birmingham,Cameras,304.3,MasterCard 850 | 2012-02-18 14:13:00,North Las Vegas,Video Games,408.67,MasterCard 851 | 2012-03-10 09:00:00,Wichita,Men's Clothing,48.09,Visa 852 | 2012-02-13 16:07:00,North Las Vegas,Garden,440.4,Cash 853 | 2012-01-03 16:44:00,Dallas,Women's Clothing,31.42,Discover 854 | 2012-11-17 12:45:00,Tampa,Men's Clothing,376.09,Discover 855 | 2012-04-09 14:43:00,Gilbert,Women's Clothing,383.54,Cash 856 | 2012-08-17 09:28:00,Lubbock,Video Games,9.58,Amex 857 | 2012-08-04 09:12:00,Irving,Women's Clothing,449.52,MasterCard 858 | 2012-11-13 10:20:00,Madison,DVDs,71.21,Discover 859 | 2012-03-16 16:08:00,Anaheim,Computers,330.38,Discover 860 | 2012-02-09 17:54:00,Phoenix,Crafts,352.17,MasterCard 861 | 2012-02-07 13:20:00,Honolulu,Toys,145.05,MasterCard 862 | 2012-07-02 10:17:00,Lexington,Computers,189.97,Cash 863 | 2012-06-07 15:53:00,Laredo,Toys,62.45,Cash 864 | 2012-07-25 12:39:00,Newark,Pet Supplies,352.03,Amex 865 | 2012-01-11 14:34:00,Laredo,Video Games,392.32,Cash 866 | 2012-04-12 12:54:00,Wichita,Video Games,466.1,Visa 867 | 2012-07-07 11:58:00,Mesa,Books,360.41,Visa 868 | 2012-09-11 09:13:00,Garland,Women's Clothing,129.84,Discover 869 | 2012-10-23 16:59:00,Buffalo,Books,476.72,Cash 870 | 2012-04-21 16:17:00,Nashville,Women's Clothing,439.13,Cash 871 | 2012-04-15 16:57:00,El Paso,Baby,93.82,Cash 872 | 2012-10-27 10:18:00,Irving,Pet Supplies,200.34,Discover 873 | 2012-09-29 11:58:00,Colorado Springs,Pet Supplies,239.85,Visa 874 | 2012-06-04 12:03:00,Boise,Children's Clothing,38.45,Cash 875 | 2012-05-01 13:54:00,Laredo,Baby,272.29,MasterCard 876 | 2012-08-27 17:44:00,Winston–Salem,Baby,413.85,MasterCard 877 | 2012-06-24 17:48:00,Boston,Toys,471.14,Cash 878 | 2012-06-27 11:21:00,San Diego,DVDs,361.02,MasterCard 879 | 2012-06-23 17:13:00,Irvine,Children's Clothing,264.88,MasterCard 880 | 2012-03-08 16:56:00,Los Angeles,CDs,80.3,Amex 881 | 2012-03-04 09:35:00,Irving,Health and Beauty,441.26,Discover 882 | 2012-01-15 16:19:00,Chandler,Toys,283.46,Visa 883 | 2012-02-16 11:38:00,Pittsburgh,Video Games,341.53,Discover 884 | 2012-02-06 13:45:00,Albuquerque,Consumer Electronics,99.69,Visa 885 | 2012-11-26 13:52:00,Laredo,Music,47.16,Visa 886 | 2012-02-02 16:42:00,El Paso,Video Games,191.37,Visa 887 | 2012-10-29 14:04:00,Boston,Children's Clothing,400.13,Amex 888 | 2012-03-15 11:51:00,Glendale,Computers,450.36,Visa 889 | 2012-05-12 16:45:00,Lubbock,Men's Clothing,434.56,Amex 890 | 2012-09-17 11:14:00,Toledo,Sporting Goods,80.68,Discover 891 | 2012-02-09 17:54:00,Chandler,Crafts,148.64,Cash 892 | 2012-04-07 15:42:00,New Orleans,Baby,37.25,Visa 893 | 2012-09-22 17:08:00,Santa Ana,Garden,328.76,Cash 894 | 2012-06-08 16:40:00,New Orleans,Consumer Electronics,454.74,Discover 895 | 2012-02-17 15:28:00,San Diego,Toys,282.5,Discover 896 | 2012-02-04 11:35:00,Charlotte,Baby,313.3,Discover 897 | 2012-12-08 09:37:00,Omaha,Women's Clothing,53.84,Amex 898 | 2012-08-05 12:02:00,Irvine,Toys,64.17,Cash 899 | 2012-07-11 13:18:00,St. Louis,Crafts,485.37,Visa 900 | 2012-05-06 17:49:00,Columbus,Women's Clothing,465.5,MasterCard 901 | 2012-12-08 16:53:00,Chula Vista,Music,162.22,Amex 902 | 2012-06-02 15:10:00,Riverside,Sporting Goods,55.01,Cash 903 | 2012-06-10 16:57:00,Los Angeles,Toys,395.2,Discover 904 | 2012-10-28 13:25:00,Chesapeake,Crafts,297.89,Amex 905 | 2012-09-30 12:22:00,North Las Vegas,Baby,171.9,Cash 906 | 2012-10-13 11:57:00,Mesa,DVDs,342.53,Discover 907 | 2012-06-25 17:40:00,Pittsburgh,Women's Clothing,61.01,Visa 908 | 2012-11-24 15:52:00,Milwaukee,Women's Clothing,202.02,Amex 909 | 2012-04-04 17:48:00,Stockton,Baby,233.97,Amex 910 | 2012-03-07 14:08:00,Chesapeake,Health and Beauty,28.77,Cash 911 | 2012-04-16 17:16:00,Laredo,Pet Supplies,190.44,Discover 912 | 2012-08-31 12:36:00,Los Angeles,Crafts,251.73,Cash 913 | 2012-02-08 11:37:00,Garland,Garden,88.06,Visa 914 | 2012-03-07 11:36:00,Winston–Salem,Music,181.86,Amex 915 | 2012-03-20 09:13:00,Minneapolis,Garden,322.18,Discover 916 | 2012-10-31 13:22:00,Detroit,DVDs,266.66,Cash 917 | 2012-06-02 14:52:00,Toledo,Sporting Goods,37.2,Discover 918 | 2012-12-04 10:47:00,Detroit,Crafts,293.48,Amex 919 | 2012-10-20 15:02:00,Irvine,CDs,377.41,Cash 920 | 2012-07-30 11:56:00,Irving,Consumer Electronics,342.29,Amex 921 | 2012-10-02 17:23:00,San Jose,Men's Clothing,399.1,Amex 922 | 2012-06-29 11:55:00,Fresno,Music,308.86,Cash 923 | 2012-05-14 15:34:00,Charlotte,Men's Clothing,149.56,Amex 924 | 2012-02-28 09:01:00,Philadelphia,Video Games,410.99,MasterCard 925 | 2012-02-13 13:42:00,Buffalo,DVDs,183.15,Amex 926 | 2012-04-30 14:00:00,San Jose,Women's Clothing,277.91,Discover 927 | 2012-07-07 13:00:00,Winston–Salem,Children's Clothing,214.12,Amex 928 | 2012-08-09 11:59:00,Henderson,Baby,291.01,Cash 929 | 2012-02-26 11:16:00,Detroit,Sporting Goods,425.74,MasterCard 930 | 2012-10-24 15:42:00,Austin,Sporting Goods,308.55,Cash 931 | 2012-11-25 16:21:00,Newark,CDs,424.27,Discover 932 | 2012-04-04 17:51:00,Greensboro,Computers,322.09,MasterCard 933 | 2012-03-04 10:43:00,Birmingham,Toys,211.01,Amex 934 | 2012-03-16 10:34:00,Sacramento,Video Games,279.18,Visa 935 | 2012-12-26 16:28:00,New Orleans,Toys,379.47,Visa 936 | 2012-12-03 13:36:00,Wichita,Garden,215.21,MasterCard 937 | 2012-01-26 16:36:00,Irving,Crafts,73.45,Cash 938 | 2012-11-21 13:21:00,Norfolk,Computers,455,Cash 939 | 2012-10-10 09:41:00,Austin,Video Games,163.32,Discover 940 | 2012-02-07 11:24:00,Irving,Children's Clothing,241.87,Amex 941 | 2012-10-03 17:55:00,San Francisco,Pet Supplies,134.1,Amex 942 | 2012-10-17 11:54:00,El Paso,CDs,392.9,MasterCard 943 | 2012-11-06 09:26:00,Charlotte,Pet Supplies,381.88,Amex 944 | 2012-04-01 15:56:00,Tulsa,Baby,110.89,Visa 945 | 2012-10-07 09:03:00,San Jose,Video Games,268.53,Visa 946 | 2012-04-28 15:39:00,Chesapeake,Consumer Electronics,304.43,MasterCard 947 | 2012-09-03 10:33:00,Colorado Springs,Books,357.27,Cash 948 | 2012-09-14 11:21:00,Fresno,Baby,461.44,Amex 949 | 2012-04-15 17:48:00,Riverside,CDs,486.75,Visa 950 | 2012-09-15 11:16:00,Gilbert,Women's Clothing,59.83,Visa 951 | 2012-10-08 12:31:00,Bakersfield,Computers,495.03,Discover 952 | 2012-10-25 15:12:00,Omaha,CDs,115.05,Discover 953 | 2012-02-27 16:52:00,Saint Paul,Books,243.51,Amex 954 | 2012-10-30 09:57:00,Charlotte,Computers,493.9,MasterCard 955 | 2012-07-27 10:58:00,Santa Ana,DVDs,314.32,Discover 956 | 2012-10-08 09:19:00,Reno,Toys,408.8,MasterCard 957 | 2012-05-14 09:48:00,Reno,CDs,302.49,Discover 958 | 2012-09-02 12:51:00,Los Angeles,Children's Clothing,7.78,MasterCard 959 | 2012-08-22 14:20:00,Rochester,Crafts,221.39,Amex 960 | 2012-10-18 15:57:00,Durham,Consumer Electronics,489.35,Visa 961 | 2012-08-02 09:58:00,Boston,Video Games,270.74,Visa 962 | 2012-09-24 14:39:00,San Francisco,DVDs,202.37,Amex 963 | 2012-12-22 16:34:00,Cincinnati,CDs,294.38,Cash 964 | 2012-02-10 10:49:00,Wichita,Consumer Electronics,407.66,Cash 965 | 2012-10-02 10:34:00,St. Petersburg,Health and Beauty,389.15,Amex 966 | 2012-04-08 10:17:00,Louisville,Consumer Electronics,310.02,Discover 967 | 2012-08-03 10:45:00,Saint Paul,Computers,304.83,Discover 968 | 2012-12-15 15:38:00,Los Angeles,Music,282.36,Visa 969 | 2012-02-23 15:55:00,Lincoln,Music,319.23,MasterCard 970 | 2012-08-04 16:38:00,North Las Vegas,Computers,117.02,Discover 971 | 2012-05-27 15:52:00,Plano,Cameras,260.55,Amex 972 | 2012-06-09 12:40:00,Albuquerque,Consumer Electronics,217.63,MasterCard 973 | 2012-07-13 13:24:00,Glendale,Cameras,390.07,Cash 974 | 2012-08-26 13:05:00,Richmond,Consumer Electronics,122.98,Discover 975 | 2012-04-04 10:30:00,Norfolk,Computers,89.06,Discover 976 | 2012-05-25 10:52:00,Norfolk,Books,18.27,Cash 977 | 2012-01-21 16:45:00,Wichita,Cameras,334.48,Visa 978 | 2012-11-29 12:04:00,Aurora,Video Games,437.78,MasterCard 979 | 2012-09-23 10:04:00,New York,Books,107.16,Cash 980 | 2012-10-07 10:10:00,Greensboro,Computers,485.58,Visa 981 | 2012-07-30 12:33:00,Anchorage,Children's Clothing,309.03,Visa 982 | 2012-09-19 14:36:00,Las Vegas,Garden,491.41,MasterCard 983 | 2012-07-06 11:39:00,Oakland,Video Games,472.41,Amex 984 | 2012-08-03 13:59:00,Richmond,Books,283.48,Cash 985 | 2012-11-24 15:52:00,Atlanta,Crafts,497.86,Amex 986 | 2012-10-15 09:31:00,Boston,Baby,217.09,Visa 987 | 2012-01-21 12:29:00,Garland,Books,359.51,Cash 988 | 2012-05-29 14:26:00,Reno,Computers,102.71,Amex 989 | 2012-05-07 17:26:00,Chicago,DVDs,48.15,Amex 990 | 2012-03-18 13:41:00,Honolulu,Children's Clothing,324.89,Discover 991 | 2012-12-08 10:27:00,Richmond,CDs,475.19,Cash 992 | 2012-01-07 09:27:00,Buffalo,Garden,50.76,MasterCard 993 | 2012-10-02 15:22:00,Boise,Baby,390.21,Amex 994 | 2012-01-14 17:05:00,Columbus,Women's Clothing,13.36,Visa 995 | 2012-02-11 09:15:00,Louisville,Garden,12.56,Visa 996 | 2012-09-05 10:06:00,Boise,Children's Clothing,272.54,Visa 997 | 2012-06-09 09:51:00,Milwaukee,Consumer Electronics,434.47,MasterCard 998 | 2012-01-27 15:00:00,Orlando,Baby,338.71,Cash 999 | 2012-02-01 13:18:00,Winston–Salem,Cameras,391.94,Visa 1000 | 2012-10-11 17:23:00,Memphis,Baby,158.03,Visa 1001 | -------------------------------------------------------------------------------- /input/file1: -------------------------------------------------------------------------------- 1 | Hello World Bye World 2 | -------------------------------------------------------------------------------- /input/file2: -------------------------------------------------------------------------------- 1 | Hello Hadoop Goodbye Hadoop 2 | -------------------------------------------------------------------------------- /java-example/WordCount.java: -------------------------------------------------------------------------------- 1 | import java.io.IOException; 2 | import java.util.StringTokenizer; 3 | 4 | import org.apache.hadoop.conf.Configuration; 5 | import org.apache.hadoop.fs.Path; 6 | import org.apache.hadoop.io.IntWritable; 7 | import org.apache.hadoop.io.Text; 8 | import org.apache.hadoop.mapreduce.Job; 9 | import org.apache.hadoop.mapreduce.Mapper; 10 | import org.apache.hadoop.mapreduce.Reducer; 11 | import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; 12 | import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; 13 | 14 | public class WordCount { 15 | 16 | public static class TokenizerMapper 17 | extends Mapper{ 18 | 19 | private final static IntWritable one = new IntWritable(1); 20 | private Text word = new Text(); 21 | 22 | public void map(Object key, Text value, Context context 23 | ) throws IOException, InterruptedException { 24 | StringTokenizer itr = new StringTokenizer(value.toString()); 25 | while (itr.hasMoreTokens()) { 26 | word.set(itr.nextToken()); 27 | context.write(word, one); 28 | } 29 | } 30 | } 31 | 32 | public static class IntSumReducer 33 | extends Reducer { 34 | private IntWritable result = new IntWritable(); 35 | 36 | public void reduce(Text key, Iterable values, 37 | Context context 38 | ) throws IOException, InterruptedException { 39 | int sum = 0; 40 | for (IntWritable val : values) { 41 | sum += val.get(); 42 | } 43 | result.set(sum); 44 | context.write(key, result); 45 | } 46 | } 47 | 48 | public static void main(String[] args) throws Exception { 49 | Configuration conf = new Configuration(); 50 | Job job = Job.getInstance(conf, "word count"); 51 | job.setJarByClass(WordCount.class); 52 | job.setMapperClass(TokenizerMapper.class); 53 | job.setCombinerClass(IntSumReducer.class); 54 | job.setReducerClass(IntSumReducer.class); 55 | job.setOutputKeyClass(Text.class); 56 | job.setOutputValueClass(IntWritable.class); 57 | FileInputFormat.addInputPath(job, new Path(args[0])); 58 | FileOutputFormat.setOutputPath(job, new Path(args[1])); 59 | System.exit(job.waitForCompletion(true) ? 0 : 1); 60 | } 61 | } -------------------------------------------------------------------------------- /java-example/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export HADOOP_CLASSPATH=${JAVA_HOME}/lib/tools.jar 4 | 5 | hadoop com.sun.tools.javac.Main WordCount.java 6 | jar cf wc.jar WordCount*.class 7 | -------------------------------------------------------------------------------- /java-example/run.sh: -------------------------------------------------------------------------------- 1 | # assuming the dir /user/csds/input exists in HDFS 2 | hadoop jar wc.jar WordCount /user/csds/input /user/csds/output 3 | -------------------------------------------------------------------------------- /java-example/wc.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prakhar1989/csds-material/765e0522dd20113abc6a4bfcd787c80642721090/java-example/wc.jar -------------------------------------------------------------------------------- /python-example/mapper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | 5 | for line in sys.stdin: 6 | line = line.strip() 7 | words = line.split() 8 | for word in words: 9 | print '%s\t%s' % (word, 1) 10 | -------------------------------------------------------------------------------- /python-example/reducer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from operator import itemgetter 4 | import sys 5 | 6 | current_word = None 7 | current_count = 0 8 | word = None 9 | 10 | for line in sys.stdin: 11 | line = line.strip() 12 | word, count = line.split('\t', 1) 13 | try: 14 | count = int(count) 15 | except ValueError: 16 | continue 17 | if current_word == word: 18 | current_count += count 19 | else: 20 | if current_word: 21 | print '%s\t%s' % (current_word, current_count) 22 | current_count = count 23 | current_word = word 24 | 25 | if current_word == word: 26 | print '%s\t%s' % (current_word, current_count) 27 | -------------------------------------------------------------------------------- /python-example/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | hs mapper.py reducer.py /user/csds/input /user/csds/output-py2 3 | --------------------------------------------------------------------------------