Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
pbellonch
Contributor II
Contributor II

Wrong format when extract boolean column

HEllo, 

I extract one table that have one column in the database using 1 or 0 (boolean). During the extarction, Qlik modify this value and write False or True. Could you help to fix this, the business team wants 0 or 1.

Thanks 

Pau

Labels (1)
5 Replies
john_wang
Support
Support

Hello @pbellonch ,

Welcome to Qlik Community forum and thanks for reaching out here!

Would you please share what's the source and target endpoints database type? We'd like to confirm the behavior for you.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
john_wang
Support
Support

Hello @pbellonch ,

Welcome to Qlik Community forum and thanks for reaching out here!

Would you please share what's the source and target endpoints database type? We'd like to confirm the behavior for you.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
pbellonch
Contributor II
Contributor II
Author

Hello John, yes the target endpoint is a file (csv) and the source is Amazon RDS for SQL Server.

Thanks 

Pau

john_wang
Support
Support

Hello @pbellonch ,

Thanks for the information, please allow me some minutes.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
john_wang
Support
Support

Hello @pbellonch ,

There is no BOOLEAN data type in SQL Server, I think you are using BIT data data type in your tables.

By default Qlik Replicate maps the BIT to Boolean data type that's why you get the behavior.

You may change the data type in transform from default BOOTEAN to INT1. In my labs the table was created as:

CREATE TABLE testboolean (id integer NOT NULL PRIMARY KEY,name char (20), bl bit);
insert into testboolean values (2,'test',1);
insert into testboolean values (3,'test',0);

So I changed the column "bl" data type to INT1 as:

john_wang_0-1713950400495.png

Then in the File target I got:

"id:INT4","name:STRING(20)","bl:INT1"
2,"test",1
3,"test",0

 

Hope this helps.

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!