jhc-systems / debezium-connector-ibmi

Debezium Connector for IBM i (AS/400)
16 stars 13 forks source link

Support BOOLEAN #73

Open rcronin opened 7 months ago

rcronin commented 7 months ago

In V7R5 and later V7R4, IBM released support for BOOLEAN data types. When using this connector with a table that contains a BOOLEAN datatype, a hard error is thrown.

msillence commented 7 months ago

it shouldn't be hard to add support for that, I'm a but busy at the moment but I'll try to get round to it

msillence commented 7 months ago

Seems we won't be upgrading for a while and currenlty we don't have 7.5 Just to check what does SELECT column_name, data_type, length FROM qsys2.SYSCOLUMNS where table_schema='<schema>' and table_name='<table>' say - where you supply the appropriate <schema> and <table> ?

Also what was the stack trace?

msillence commented 7 months ago

Also there's no as400 type for this in the jt400 library I guess it might be possible to decode with a as400bin1 type

rcronin commented 7 months ago

Here's the stack trace we get. The column is "RETURNING"

image

Here's the result from syscolumns:

image
msillence commented 7 months ago

Debezium has adopted this source code and I realiase I should really move the bug there: https://issues.redhat.com/browse/DBZ-7795 I think the next step should be to check how the boolean is encoded and also verify if they perform packing if there are multiple booleans together

rcronin commented 7 months ago

Is there anything from a testing perspective to get you more information on this?

Our vendor, ETLworks, had success testing this connector using pub400. Last time I tested using pub400, they have 7.5 running

jpechane commented 7 months ago

@rcronin Let's move additional discussion to the Jira. Just a tangential question, could you please share the steps to run the connector against pub400? I tried but failed due to insuffient privileges and I'd definitely like to see it done and running - I'd incrorporate it into our IBMi connector tutorial and upcoming blogpost. Thanks for any hint/recommendation!

rcronin commented 7 months ago

Sure - here's the steps we took to get this to work.

In the schema that PUB400 automatically creates for you (in my case RCRONIN1), do the following:

jpechane commented 7 months ago

@rcronin Thanks! Could you please also share the connector configuration? Without passowrd of course :-). I want to make sure we are completely on the same page.

rcronin commented 7 months ago

I've attached what the vendor's abstraction of the ibmi debezium connection config. I'm not able to get the JSON for the debezium-connector API call. config.txt

jpechane commented 7 months ago

@rcronin Thanks, I managed to do it myself based on your information!

rcronin commented 6 months ago

@jpechane I wanted to check in and see if you've had any success implementing this? Thanks!

rcronin commented 3 months ago

Any update here?

jpechane commented 3 months ago

IIRC @msillence mentioned last week something that requires IBM input/fix.

msillence commented 3 months ago

Sorry I've not done this yet. I've been waiting for our local IBMi to have the patch installed that is still due soon. IBM did mention they were interested in helping with development and have offered to look at this.

rcronin commented 2 months ago

That's promising. I am willing to lend a hand as well, if I can get some instructions on how to implement.