Menu
Amazon Mobile Analytics
User Guide

Part 7: Loading Events from Amazon S3 to Amazon Redshift

To manually load events into the Amazon Redshift cluster from your Amazon S3 bucket, run the loadevents command at the command line.

Copy
$ DataExport/bin/loadevents

Watch the logs for errors. Here is an example of the output:


					Example command line output from manually loading events into the Amazon Redshift cluster.

Once all of the events have successfully loaded, set up a crontab to execute the loadevents command every hour and write to the logs directory. Enter this at the command line:

Copy
$ echo '0 * * * * /usr/bin/flock -n -E 0 /tmp/lockfile /home/ec2-user/DataExport/bin/loadevents -l /home/ec2-user/DataExport/logs/ || rm /tmp/lockfile' | crontab -

Verify that the loadevents command runs every hour with the following command:

Copy
$ crontab –l

Here is an example of the output:


					Example command line output from manually loading events into the Amazon Redshift cluster.