fluent/fluent-plugin-sql

Fluentd sql output plugin configuration for auto incremented column issue

harsh288 opened this issue · 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 ??

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