我正在使用 fluentd 配置从文本文件中读取数据并将其推送到 Oracle 数据库,当 fluentd 推送数据时,我有 clob 和 nclob 类型的数据类型,该列始终为空,我没有看到任何错误。我不确定如何在 fluentd 中解决这个问题,下面是我所做的配置。
我正在使用 oracle 增强适配器和 sql 插件
https://github.com/rsim/oracle-enhanced
https://github.com/fluent/fluent-plugin-sql/issues
#
# Fluentd configuration file
#
# Config input
<source>
@type forward
port 24224
</source>
# Config output
<match cpu_*>
@type stdout
</match>
<match foo_*>
@type stdout
</match>
<match memory_*>
@type sql
host {DATABASE_HOSTNAME}
port 1521
database {DATABASE_NAME}
adapter oracle_enhanced
username {DATABASE_USERNAME}
password {DATABASE_PASSWORD}
<table>
table fluentd_log
column_mapping 'timestamp:created_at,Mem.text:mem_text,Mem.used:mem_used'
# This is the default table because it has no "pattern" argument in <table>
# 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>
</match>
创建表 FLUENTD_LOG (ID NUMBER(8), CREATED_AT VARCHAR2(50 BYTE), MEM_TEXT CLOB, MEM_USED VARCHAR2(50 BYTE))
ID CREATED_AT MEM_TEXT MEMUSED
1 29-08-99 null test