Question

SQL Writer Column Length

  • 6 November 2013
  • 7 replies
  • 14 views

Hello!

 

 

I am trying to write to an MS SQL DB and some of the feature classes have a primary key where the column name is longer than 30 characters.  On the writer feature types, I can set the default primary index colum to a length longer than 30 characters, but when I look under the user attributes, the column name gets truncated to 30 characters.  When I try to write the features to the DB, it fails because the field names are no the same.

 

 

Does anyone know if there is a work around for this, or how I can get a column name longer than 30 characters to be recognized under the features user attributes?

 

 

Thanks!

 

Tristan

7 replies

Userlevel 4
Hi,

 

 

have you tried to import the feature type (table) definition from SQL Server into FME, or are you creating the output feature types manually?

 

 

Go to Writer / Import feature types and select the relevant table(s). FME will then create the correct feature type defintion(s) for you.

 

 

David
Hi David,

 

 

Yes, that is how I created my feature types in the first place.  It's just for some reason FME wants to truncate the name in the user attributes which then kills the process because it can't find the right Primary Key column for writing to the SQL DB.
Userlevel 4
Hi,

 

 

it could be a bug, I recommend you send this case to Safe support.

 

 

But do make sure that you're using the latest version of FME first, as it might be a known issue that has already been fixed.

 

 

David
Badge +7

I have this problem with an ArcSDE layer in SQL Server using FME 2018.1.01. According to the ESRI documentation, the maximum field name length for an ArcSDE layer is 31 characters:

http://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/enterprise-geodatabase-limits.htm

This is presumably an ESRI limit due to the "column_name" in SDE.SDE_Column_Registry being NVarChar(32). The SQL Server limit is 128.

So why won't FME let me have an ArcSDE field name that is 31 characters?

 

Badge +2

FME only supports ArcSDE field name lengths of 30 characters when some databases would support 31.

The allowed field name lengths vary depending on the underlying database. At the time of authoring, FME doesn't know the underlying database, so it uses the shortest allowed name length which is 30 (for Oracle). See the article referenced above by @tim_wood. The current workaround is to use Import Feature Types on the writer. This will grab the correct field name from the database.

Did u guys got any answer from fmesafe support to handle more than 30 character length column of oracle db

Badge +2

Did u guys got any answer from fmesafe support to handle more than 30 character length column of oracle db

@sekarjntu​ did you try importing the feature type as suggested above?

Reply