[ 
https://issues.apache.org/jira/browse/NIFI-14929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann reassigned NIFI-14929:
---------------------------------------

    Assignee: David Handermann  (was: RAVINARAYAN SINGH)

> DatabaseTableSchemaRegistry Fails on incompatible functions for column 
> default values
> -------------------------------------------------------------------------------------
>
>                 Key: NIFI-14929
>                 URL: https://issues.apache.org/jira/browse/NIFI-14929
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 2.4.0
>            Reporter: RAVINARAYAN SINGH
>            Assignee: David Handermann
>            Priority: Minor
>              Labels: controller_services
>             Fix For: 2.6.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
>  
> NiFi Version: 2.4.0
> Postgres: 14
> I am encountering an issue when using {{*DatabaseTableSchemaRegistry*}} with 
> the following table definition:
>  
> {code:java}
> CREATE TABLE stage.status_monitor (
>       filename varchar NULL,
>       dataset varchar NULL,
>       table_name varchar NULL,
>       data_format varchar NULL,
>       created_at timestamptz NULL DEFAULT CURRENT_TIMESTAMP 
> ); {code}
> But i am getting following error :
>  
> {code:java}
> org.apache.nifi.schema.access.SchemaNotFoundException: Could not retrieve 
> schema with name 'status_monitor' from the configured Schema Registry - 
> Caused by: java.lang.IllegalArgumentException: Cannot set the default value 
> for field [created_at] to [CURRENT_TIMESTAMP] because that is not a valid 
> value for Data Type [TIMESTAMP:yyyy-MM-dd HH:mm:ss] {code}
> From reviewing the code, it appears that NiFi expects a literal value rather 
> than a function for default values. Handling expressions would likely be 
> complex.
> [Slack discussion 
> |https://apachenifi.slack.com/archives/C0L9S92JY/p1755195086867549]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to