Skip to main content
Open

Enhanced logging of data truncation warnings

Related products:Transformers
lauryn00789
davidcooke
siennaatsafe
ebygomm
virtualcitymatt
+40
  • lauryn00789
    lauryn00789
  • davidcooke
    davidcooke
  • siennaatsafe
    siennaatsafe
  • ebygomm
    ebygomm
  • virtualcitymatt
    virtualcitymatt
  • danilo_fme
    danilo_fme
  • tcrossman
    tcrossman
  • bwn
    bwn
  • kennyo
    kennyo
  • chriswilson
    chriswilson
  • bibold
  • tim_wood
    tim_wood
  • revesz
    revesz
  • owski
  • erooen
  • neilmyoung
    neilmyoung
  • mapper
    mapper
  • demix
    demix
  • cdeblonde
  • tiler
    tiler
  • pierre_t
  • salvaleonrp
    salvaleonrp
  • johnt
    johnt
  • zuzanna_sz
  • roland.martin
    roland.martin
  • mlupien
    mlupien
  • jakethepainter
    jakethepainter
  • rowdy
  • joshuadamron
    joshuadamron
  • mb_fdfa
    mb_fdfa
  • simon_maddern
    simon_maddern
  • morijlumos
  • hrvoje
    hrvoje
  • janrykr
    janrykr
  • phoeffler
    phoeffler
  • shalpin
    shalpin
  • beeem
    beeem
  • emilyn
  • ecollet
  • zu
  • rkinser
    rkinser
  • rock
  • sabrinemnii
    sabrinemnii
  • vilemrousi
    vilemrousi
  • df_cos
    df_cos

rkinser
Contributor

I regularly run routines writing to multiple tables in multiple databases. When writing out several hundred thousand records, it is troubling to get a warning in the translation log that merely states "Microsoft SQL Server Non-Spatial Writer: 2 attribute value(s) were truncated"

Since FME knows that it truncated a value, could the warning be expanded to include additional information like the table, field, and data value so that we don't have to spend time with AttributeValidators and StringLengthCalculators to try and figure out which of the myriad of data entries was the offending value?

6 replies

tim_wood
Contributor
Forum|alt.badge.img+8
  • Contributor
  • May 15, 2019

Yes please! This is so annoying! I've had this problem a few times, but now I've got it for a dataset of 40 million records X 128 fields. I've got a great set of transformers (AttributeExploder > AttributeCreator (StringLength of each _attr_value) > StatisticsCalculator to get maximum) that will give me the max length of every value in every field, but I think my computer would melt if I throw that much data at it!

Could the FeatureWriter be enhanced to output features where attributes were truncated through a separate port, or add attribute(s) to each feature to say if values were truncated?


phoeffler
Contributor
Forum|alt.badge.img+5
  • Contributor
  • March 25, 2020

I'm seeing this with the Geodatabase Writer and it would be very helpful to have this information so we could see if it's an issue we need to address or not.


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • May 19, 2020

The level of detail you get with truncate warnings seems to vary depending on the format being written, e.g. shape file provides the truncated value in the log (although not what field it's in), writing to ArcSDE and you get "Geodatabase Writer: 3 attribute value(s) were truncated" only.

I've just written a little bit of python that will check the string lengths based on a schema list which at least avoids exploding all the data (the schema data needs to be hardcoded at the moment)

As an aside, does anyone know when truncate warnings were introduced, or have they always been logged? @mark2atsafe


tim_wood
Contributor
Forum|alt.badge.img+8
  • Contributor
  • May 17, 2021

This is still an irritation for me. If I knew which fields the values were truncated in, I could make a judgement call about whether they were important or not.


vilemrousi
Contributor
Forum|alt.badge.img+1
  • Contributor
  • August 23, 2024

Hello,

 

to add my two cents, this very important enhancement request, when converting big bunch of files (in my case more than 1 million of XMLs to Esri File Geodatabase), it would be more than helpful to see which features were affected - and how much, or at least which fields and how much (in maximum), to I can change the setting of the output field appropriately!

 

Thanks.


chriswilson
Supporter
Forum|alt.badge.img+11
  • Supporter
  • August 27, 2024

Agree with this.  Any action that changes data should be clearly logged and even added as a warning message at the end of the translation - ‘Translation Successful with Warnings’ for truncation and possibly other warnings - as an option.


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