3

私はApache NiFiを初めて使用します。次のクエリを使用して、クエリレコードプロセッサで日付型データをタイムスタンプに変換しました

select ${fn Convert(<ColumnName>,<Datatype as 'timestamp'>) as ColumnName from flowfile}

しかし、タイムスタンプを日時に変換するために以下のクエリを試したときに問題に直面しています

select {fn CONVERT(CAST(CurrentDate as BIGINT),date)} as CurrentDate from flowfile

エラーの詳細:

QueryRecord[id=0e0d33b4-0165-1000-9db1-e7d0dad2240d] Unable to query StandardFlowFileRecord[uuid=b04e508b-675e-444b-8a87-d77b77b802cd,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1533555234293-23, container=default, section=23], offset=3200, length=134],offset=0,name=AdventureWorks.csv,size=134] due to null: java.lang.NullPointerException

Query Record Processor を使用してタイムスタンプ値を DateTime に変換するにはどうすればよいですか?

4

1 に答える 1