Hi Vijay,
Thanks for the reply
Let’s consider the scenario:
Source data type: ‘bit’
Destination data type: ‘bit’
QueryDatabaseTable=> UpdateRecord=> PutDatabaseRecord
QueryDatabaseTable:
Use Avro Logical Types
true
UpdateRecord:
Property
Value
Record Reader
AvroReader
Record Writer
AvroRecordSetWriter
Replacement Value Strategy
Record Path Value
/event_status
${event_status('true'):ifElse('1', '0')}
PutDatabaseRecord:
Record Reader
AvroReader
Thankyou
Deepanshu
From: Vijay Chhipa <[email protected]>
Sent: Thursday, September 26, 2024 2:17 AM
To: David Dean via users <[email protected]>
Subject: Re: Datatype Transformation
Hi Deepanshu,
Can you please post the configuration of your UpdateRecord Processor, This is a
common use case and I believe this will benefit the community.
Thanks
Vijay
On Sep 10, 2024, at 04:44, Deepanshu Lodhi
<[email protected]<mailto:[email protected]>> wrote:
Hii Dennis,
Thanks for the reply
I'll practice your suggested approach, however I've already done it by using
"UpdateRecord" processor.
Deepanshu
________________________________
From: Dennis N Brown <[email protected]<mailto:[email protected]>>
Sent: Thursday, September 5, 2024 7:32 PM
To: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>
Subject: Re: Datatype Transformation
Hello Deepanshu, I suggest you do the transformation in the query in the
"QueryDatabaseTable".
Using a combination of string functions substring() and or date functions until
you build the string you need on the MSSQL side.
On Thu, Sep 5, 2024 at 4:01 AM Deepanshu Lodhi
<[email protected]<mailto:[email protected]>> wrote:
Hi all,
I've created a simple data flow using "QueryDatabaseTable" and
"PutDatabaserRecord" which transfers the data from PostgreSQL DB to MSSQLServer
DB in which the datatype of datetime columns in source_db i.e., PostgreSQL
table is "timestamp without time zone", which is not compatible with
destination_db i.e., MSSQLServer.
This logs an error, what would be the correct method to transform the datatype
of the datetime columns while serving data from PostgreSQL to MSSQLServer.
Can anyone give me a tip how to transform the datatype of the such columns?
Thankyou in advance
Deepanshu
--
Dennis N Brown
Mobile: +1 919-368-4334
Linkedin<https://linkedin.com/in/dennis-n-brown-nthedata>
US PostgreSQL Association<https://postgresql.us/>