Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
commit f6d3cbbb549fa1a2db898674e71bcf7890eee87c
Author: Yves-Eric Martin <yemartin@mediweb.jp>
Date: Thu Jul 10 16:20:25 2014 +0900
Add note about :new_records_only and UTC (Rails default) databases.
diff --git a/Documentation.textile b/Documentation.textile
index 15587b2..6d49bdd 100644
--- a/Documentation.textile
+++ b/Documentation.textile
@@ -26,7 +26,9 @@ Note that if you do not use the gem install you will still require Ruby Gems and
ActiveWarehouse ETL depends on FasterCSV, ActiveRecord, ActiveSupport and SQLite3. If these libraries are not already installed they should be installed along with ActiveWarehouse ETL. Naturall
-Finally, if you are running the etl command line, ensure that you are either including a config file that includes rails or add "require 'rails/all'" to the bin/etl script if required.
+Finally, if you are running the <code>etl</code> command line tool, ensure that you are either including a config file that requires rails, or add <code>require 'rails/all'</code> to the <code>b
+You may also need to add <code>ActiveRecord::Base.default_timezone = :utc</code> if your databases use UTC timestamps (Rails default behavior).
+
h2. Setting Up
@@ -464,7 +466,9 @@ In addition, the following optional elements may be provided:
<dt>:order</dt>
<dd>Specify the order by portion of the query that will be used to extract the data. The value must be a SQL fragment if specified.</dd>
<dt>:new_records_only</dt>
- <dd>Specify the column to use when comparing timestamps against the last successful ETL job execution for the current control file.</dd>
+ <dd>Specify the column to use when comparing timestamps against the last successful ETL job execution for the current control file.
+ You may need to set <code>ActiveRecord::Base.default_timezone = :utc</code> in a config file if your source timestamps are UTC (Rails default behavior).
+ Note that this will also affect the ETL execution database.</dd>
<dt>:conditions</dt>
<dd>Specifies an SQL fragment that will be added to the @WHERE@ clause to filter the rows that will be extracted</dd>
<dt>:query</dt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.