Skip to main content
Question

Why do readers convert boolean ( example 0) into 'No'? i want to keep it as in de source.

  • January 12, 2023
  • 8 replies
  • 144 views

dannykgf
Contributor
Forum|alt.badge.img+2

Source

SourceFME reader

8 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

Which format is this?


dannykgf
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • January 12, 2023
redgeographics wrote:

Which format is this?

i am reading from aan MSSQL DB and the format is Bit. In de MSSQL DB is the value 0 or 1. But if i read it with a FME reader i get for the same column 'Yes' or 'No'. How can i get the same as in the source with '0' and '1'?


danminneyatsaf
Safer
Forum|alt.badge.img+12

Hi @dannykgf​, I've just tested this in FME Desktop 2022.2 and can confirm that this looks like a bug. Sorry about the inconvenience. I've created a ticket to get this resolved (FMEENGINE-76082). We will notify you here as soon as the bug has been resolved in a new version of FME.


dannykgf
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • January 14, 2023
danminneyatsaf wrote:

Hi @dannykgf​, I've just tested this in FME Desktop 2022.2 and can confirm that this looks like a bug. Sorry about the inconvenience. I've created a ticket to get this resolved (FMEENGINE-76082). We will notify you here as soon as the bug has been resolved in a new version of FME.

Thank you @danminneyatsaf​ !

Do you think there is any workaround?

Thank you in advance!


danminneyatsaf
Safer
Forum|alt.badge.img+12
dannykgf wrote:

Thank you @danminneyatsaf​ !

Do you think there is any workaround?

Thank you in advance!

@dannykgf​ You could try using the AttributeManager to change the value of the attribute that contains bit data.

You could use conditional values so that if the value = Yes, then it sets it to 1, and if the value = No, then it sets the value to 0. See the screenshot below:

image 

Unfortunately, there aren't any more automated/intuitive workarounds that I am aware of at the moment.


dannykgf
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • January 17, 2023
dannykgf wrote:

Thank you @danminneyatsaf​ !

Do you think there is any workaround?

Thank you in advance!

Thank you @danminneyatsaf​ !


boneill81
Forum|alt.badge.img

Hi @danminneyatsaf​, I was wondering if this had yet been patched? I ran into it this morning but I have tables with quite a few BIT columns and it will be tiresome to have to create conditionals for each column. Thanks.


danminneyatsaf
Safer
Forum|alt.badge.img+12
boneill81 wrote:

Hi @danminneyatsaf​, I was wondering if this had yet been patched? I ran into it this morning but I have tables with quite a few BIT columns and it will be tiresome to have to create conditionals for each column. Thanks.

Hi @boneill81​ unfortunately, the team is still investigating the issue. If this change were to take place, it would affect more than one format which means more investigation is needed before we can commit changes.

 

I agree that having to set conditional values on each column is a frustrating workaround. I created the BooleanValueMapper transformer on the FME Hub to make this process easier. With this transformer you can make changes to all your attributes (or all your Boolean attributes) in one step. The transformer allows you to provide what value you would like to map your Boolean values (0 and 1) to.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings