Skip to main content
Question

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


pmcpherson
Contributor
Forum|alt.badge.img+9
Does the SchemaScanner add an extra character to the fme_varchar(n) attribute?

4 replies

kailinatsafe
Safer
Forum|alt.badge.img+21

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.


pmcpherson
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • June 12, 2023
kailinatsafe wrote:

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).


kailinatsafe
Safer
Forum|alt.badge.img+21
pmcpherson wrote:

​ 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.


pmcpherson
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • June 13, 2023

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


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