Skip to content

Commit aa84530

Browse files
committed
Fix for SQLite date not supported datatype
1 parent 70b2e9a commit aa84530

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/logstash/inputs/sqlite.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ def run(queue)
162162
# store each column as a field in the event.
163163
row.each do |column, element|
164164
next if column == :id
165-
event.set(column.to_s, element)
165+
if element.instance_of? Date
166+
event.set(column.to_s, element.to_s)
167+
else
168+
event.set(column.to_s, element)
169+
end
166170
end
167171
queue << event
168172
@table_data[k][:place] = row[:id]

0 commit comments

Comments
 (0)