Skip to main content
Does the SchemaScanner add an extra character to the fme_varchar(n) attribute?

Hello @pmcpherson​, thanks for posting! Do you mean the SchemaScanner is adding an extra character to the fme_data_type attributes values (for the schema) or the actual attribute values themselves? Feel free to use things like screenshots to elaborate or explain further! Otherwise, if you're able to share more information, here are some things that may be helpful:

  • What sort of (source) data are we sending through the SchemaScanner?
  • What version of FME Form are you currently using? (Help > About FME Workbench)
  • Are you able to use StringLengthCalculator(s) to confirm the extra character is present?

I ran a very quick test in FME 2023.0.0.1 (latest beta) on the attribute values, and I wasn't seeing any additional characters on output:

imageIf you're able to share a sample dataset or workspace, I will happily take a closer look! Best, Kailin.


Hello @pmcpherson​, thanks for posting! Do you mean the SchemaScanner is adding an extra character to the fme_data_type attributes values (for the schema) or the actual attribute values themselves? Feel free to use things like screenshots to elaborate or explain further! Otherwise, if you're able to share more information, here are some things that may be helpful:

  • What sort of (source) data are we sending through the SchemaScanner?
  • What version of FME Form are you currently using? (Help > About FME Workbench)
  • Are you able to use StringLengthCalculator(s) to confirm the extra character is present?

I ran a very quick test in FME 2023.0.0.1 (latest beta) on the attribute values, and I wasn't seeing any additional characters on output:

imageIf you're able to share a sample dataset or workspace, I will happily take a closer look! Best, Kailin.

​ Thanks @kailinatsafe​. The data source for this example is a PostgreSQL database with PostGIS extension. I created a limited example that should illustrate my question, per that attached workspace. In this example the FeatureReader is reading a table with a few rows, with a field called "clli". That field is populated with a 10- or 11-character string. The SchemaScanner is showing that field as fme_varchar(n), where n is 1 greater than the actual string length. Maybe I'm misunderstanding the correct use of that transformer? In this case I was hoping to use it to analyze a large number of records and provide an indication for the correct field length for a table to be manually created to accept the data. The FME Workbench version is as follows: EditionFME Database Edition, Version: FME(R) 2022.2.3.0 (20230131 - Build 22789 - WIN64).


​ Thanks @kailinatsafe​. The data source for this example is a PostgreSQL database with PostGIS extension. I created a limited example that should illustrate my question, per that attached workspace. In this example the FeatureReader is reading a table with a few rows, with a field called "clli". That field is populated with a 10- or 11-character string. The SchemaScanner is showing that field as fme_varchar(n), where n is 1 greater than the actual string length. Maybe I'm misunderstanding the correct use of that transformer? In this case I was hoping to use it to analyze a large number of records and provide an indication for the correct field length for a table to be manually created to accept the data. The FME Workbench version is as follows: EditionFME Database Edition, Version: FME(R) 2022.2.3.0 (20230131 - Build 22789 - WIN64).

Hello @pmcpherson​, thanks for providing context! I think you're correct in your interpretation! I wasn't able to run your workspace, but i was able to reproduce the issue in FME 2022.2.3 as well as FME 2022.2.6.(eg. _length = 7 and schema return is fme_varchar(8)).

 

It seems the issue is resolved in FME 2023.0.0.1. I am seeing the correct number returned for fme_varchar(n) (eg. _length = 7 and schema return is fme_varchar(7)). Would you mind downloading the latest official beta and letting me know if you're still seeing the incorrect value? Happy to help, Kailin.


Thanks @kailinatsafe​. Good to know I was not imagining things! I'll try the new beta when time permits, and let you know.


Reply