fluent-plugin-sql icon indicating copy to clipboard operation
fluent-plugin-sql copied to clipboard

Fluentd sql output plugin configuration for auto incremented column issue

Open harsh288 opened this issue 4 years ago • 1 comments

Hello,

I have the below configuration for SQL database, so I have a column which is primary and it is autoincremented column, ideally while inserting data, we don't need to specify this column as this is handled in SQL server however we cannot ignore this column in fluentd, if we exclude the column then it throws error, in below case "Id" is mandatory.

<filter record.**> @type record_transformer enable_ruby true Id ${id} timestamp ${time}

<filter record.**>
  @type stdout
</filter>

<match record.**> 
    
    @type sql
    host myhost
    username myuser
    password mypassword
    database mydb
    adapter sqlserver

    <table>
      table simple_table
      column_mapping 'Id:Id,timestamp:timestamp'
    </table>
    
    flush_interval 1s
    # disable_retry_limit
    # num_threads 8
    # slow_flush_log_threshold 40.0
</match>

How to omit auto-incremented columns ??

harsh288 avatar Aug 01 '21 06:08 harsh288

@repeatedly @kenhys @frsyuki @cosmo0920 @ashie @ganmacs Could you please help me with the above issue ??

harsh288 avatar Sep 02 '21 05:09 harsh288