[ 
https://issues.apache.org/jira/browse/NIFI-14929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18018322#comment-18018322
 ] 

ASF subversion and git services commented on NIFI-14929:
--------------------------------------------------------

Commit 7fb47fca87423ea1396b032c6ef54feed14d14d6 in nifi's branch 
refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=7fb47fca87 ]

NIFI-14929 Fixed Database Registry to ignore incompatible default values

Signed-off-by: Pierre Villard <[email protected]>

This closes #10276.


> 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: Bug
>          Components: Extensions
>    Affects Versions: 2.4.0
>            Reporter: RAVINARAYAN SINGH
>            Assignee: David Handermann
>            Priority: Minor
>              Labels: controller_services
>          Time Spent: 50m
>  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