Open zamanimehdi opened 4 years ago
I found a line of code that caused the error file: /usr/lib/ruby/gems/2.5.0/gems/activerecord-import-0.28.2/lib/activerecord-import/import.rb
...
# Force the primary key col into the insert if it's not on the list and we are using a sequence and stuff a nil value for it into each row so the sequencer will fire later
symbolized_column_names = Array(column_names).map(&:to_sym)
symbolized_primary_key = _Array(primary_key).map(&:to_sym) # this line
...
I solved the problem by change the out_sql code and add primery key in it. my fluentd config change to :
<match **>
@type sql
host *.*.*.*
port 1317
database system
adapter clickhouse
username default
password ******
socket 1317
<table>
table zamanitable1
primary_key dt
column_mapping 'TimeGenerated:dt,ComputerName:ComputerName,RecordNumber:RecordNumber,EventType:EventType'
</table>
</match>
hello, I want to send event to clickhouse, That's why I install fluentd and fluent-plugin-sql. then i create table in clickhouse :
and install this gem:
my fluentd config :
i get this error on fluentd cli:
fluentd has successfully connected to clickhouse (Error message when table not exists) but cannot write to db, where is the problem from?