README.md in fluent-plugin-sql-0.4.0 vs README.md in fluent-plugin-sql-0.4.1

- old
+ new

@@ -65,11 +65,11 @@ * **host** RDBMS host * **port** RDBMS port * **database** RDBMS database name * **adapter** RDBMS driver name. You should install corresponding gem before start (mysql2 gem for mysql2 adapter, pg gem for postgresql adapter, etc.) -* **user** RDBMS login user name +* **username** RDBMS login user name * **password** RDBMS login password * **tag_prefix** prefix of tags of events. actual tag will be this\_tag\_prefix.tables\_tag (optional) * **select_interval** interval to run SQLs (optional) * **select_limit** LIMIT of number of rows for each SQL (optional) * **state_file** path to a file to store last rows @@ -79,10 +79,11 @@ * **tag** tag name of events (optional; default value is table name) * **table** RDBM table name * **update_column**: see above description * **time_column** (optional): if this option is set, this plugin uses this column's value as the the event's time. Otherwise it uses current time. +* **primary_key** (optional): if you want to get data from the table which doesn't have primary key like PostgreSQL's View, set this parameter. ## Input: Limitation You should make sure target tables have index (and/or partitions) on the *update\_column*. Otherwise SELECT causes full table scan and serious performance problem. @@ -105,10 +106,11 @@ socket path_to_socket remove_tag_prefix my.rdb # optional, dual of tag_prefix in in_sql <table> table table1 + column_mapping 'timestamp:created_at,fluentdata1:dbcol1,fluentdata2:dbcol2,fluentdata3:dbcol3' # This is the default table because it has no "pattern" field # The logic is such that if all non-default <table> blocks # do not match, the default one is chosen. # The default table is required. </table> @@ -134,15 +136,15 @@ * **host** RDBMS host * **port** RDBMS port * **database** RDBMS database name * **adapter** RDBMS driver name. You should install corresponding gem before start (mysql2 gem for mysql2 adapter, pg gem for postgresql adapter, etc.) -* **user** RDBMS login user name +* **username** RDBMS login user name * **password** RDBMS login password * **socket** RDBMS socket path * **remove_tag_prefix** remove the given prefix from the events. See "tag_prefix" in "Input: Configuration". (optional) \<table\> sections: * **table** RDBM table name -* **column_mapping**: Record to table schema mapping. The format is consists of `from:to` or `key` values are separated by `,`. For example, if set 'item_id:id,item_text:data,updated_at' to **column_mapping**, `item_id` field of record is stored into `id` column and `updated_at` field of record is stored into `updated_at` column. +* **column_mapping**: [Required] Record to table schema mapping. The format is consists of `from:to` or `key` values are separated by `,`. For example, if set 'item_id:id,item_text:data,updated_at' to **column_mapping**, `item_id` field of record is stored into `id` column and `updated_at` field of record is stored into `updated_at` column. * **pattern**: the pattern to which the incoming event's tag (after it goes through `remove_tag_prefix`, if given). The patterns should follow the same syntax as [that of <match>](http://docs.fluentd.org/articles/config-file#match-pattern-how-you-control-the-event-flow-inside-fluentd). **Exactly one <table> element must NOT have this parameter so that it becomes the default table to store data**.