You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently using Fluentd to insert log data into a PostgreSQL table (metrics_apis_received). However, I have encountered an issue where the insert_time column in the PostgreSQL table is being populated with NULL instead of the expected DEFAULT now() value when data is inserted.
Here is the current setup for the Fluentd configuration and PostgreSQL table:
CREATE TABLE IF NOT EXISTS public.metrics_apis_received
(
log_time timestamp without time zone NOT NULL,
company text COLLATE pg_catalog."default",
method text COLLATE pg_catalog."default",
path text COLLATE pg_catalog."default",
source text COLLATE pg_catalog."default",
count integer,
insert_time timestamp without time zone DEFAULT now()
);
Issue:
The insert_time column is set to NULL on insert, which is not expected, as it has a default value of now() in the PostgreSQL schema.
When inserting data manually into the table, insert_time is correctly populated with the current timestamp (now()).
Expected Behavior:
The insert_time column should automatically use the default now() value when no value is provided during insert, without needing to map it explicitly in the Fluentd configuration.
Can you please assist in resolving this issue, or suggest the best approach to ensure the insert_time column is populated correctly with the default timestamp (now())?
Thank you for your assistance.
Best regards,
Kanji Vidyasagar
The text was updated successfully, but these errors were encountered:
If 'column_mapping' does not include certain columns, why Fluentd is sending NULL value by default for those columns?
In our case 'insert_time' column. which is not mentioned on below list of columns.
Hi Support Team,
I am currently using Fluentd to insert log data into a PostgreSQL table (metrics_apis_received). However, I have encountered an issue where the insert_time column in the PostgreSQL table is being populated with NULL instead of the expected DEFAULT now() value when data is inserted.
Here is the current setup for the Fluentd configuration and PostgreSQL table:
Fluentd Configuration (Snippet):
PostgreSQL Table Schema:
Issue:
The insert_time column is set to NULL on insert, which is not expected, as it has a default value of now() in the PostgreSQL schema.
When inserting data manually into the table, insert_time is correctly populated with the current timestamp (now()).
Expected Behavior:
The insert_time column should automatically use the default now() value when no value is provided during insert, without needing to map it explicitly in the Fluentd configuration.
Can you please assist in resolving this issue, or suggest the best approach to ensure the insert_time column is populated correctly with the default timestamp (now())?
Thank you for your assistance.
Best regards,
Kanji Vidyasagar
The text was updated successfully, but these errors were encountered: