Skip to main content
Question

FileGDB Default value inserted as ' ' (space) instead of default

  • January 28, 2013
  • 7 replies
  • 20 views

Forum|alt.badge.img+1
Hi, I am converting data from one filegdb to another using a schema mapper. The problem i am getting is there are certain attribute defined in target GDB which are not null and has some default values, these attributes are not in mapping schema but when I run the workbench value gets inserted is ' '(space) instead of the FileGDB's default value. Am i missing anything here?

 

 

Appreciate your help.

 

Thanks for your help in advance.

 

Zubair

 

 

7 replies

sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • January 28, 2013
Not sure how to change the default null-value - however you can add a DEFAULT VALUE to the schemamapper-file. 

 

 

Described here: 

 

http://fmepedia.safe.com/articles/Samples_and_Demos/Mapping-Schemas-using-SchemaMapper

 


Forum|alt.badge.img+1
  • Author
  • January 28, 2013
I already have the default value in mapping file but this particular attribute is not part of the attribute mapping since its not present in the source data.

 

I am not sure why FME is changing the value to space rather then inserting fileGDB default unless I am missing something.

 

I tried with static schema, even without the schema mapper, but the result is the same.

 

Any clue?

 

 

 


Forum|alt.badge.img
  • January 28, 2013
Are you using the FILEGDB(3rd party API) or the GEODATABASE_FILE(using ArcObjects) ?

 

I have seen this behaviour when importing shapfiles with empty attributes into geodatabases with ArcMap (ie using ArcObjects).

 

/Tim

Forum|alt.badge.img+1
  • Author
  • January 29, 2013
Hello Tim, I am using GEODATABASE_FILE(using ArcObjects), I tried with API option but it could neither read nor write to FileGDB. Are there any prerequisite to it?

 

 

Reader error:

 

Geodatabase Error (-2147024809): Invalid function arguments.

Could not open File Geodatabase table `GeneralCategory/MiscellaneousFeatureArea'.

 

Writer error:

 

FileGDB Writer: A feature with feature type `LANDMARK' could not be written.

 

 

There is nothing more that I can understand from the log. I am using ArcGIS 10 and the feature is 3D.

 

 

Thanks

 

Zubair

 

 

 

 


Forum|alt.badge.img
  • January 29, 2013
There are no requisites as far as I know. I was hoping the FILEGDB could solve it.

 

I would send the error to FME support.

 

/Tim

david_r
Celebrity
  • January 29, 2013
It might be that the Writer outputs an empty string rather than NULL to the Geodatabase, thereby not triggering the default value.

 

 

Try inserting an AttributeTrimmer followed by a NullAttributeRemover (from the FME Store) before your Writer. I would be surprised if that doesn't work.

 

 

Also, try both the ArcObjects and the API Writer, as mentioned below.

 

 

David

Forum|alt.badge.img+1
  • Author
  • January 30, 2013
As a workaround I have added all these default fields in my schema mapping spread sheet with default value, it worked but I have to add every default field in spread sheet.

 

 

@Tim -  FileGDB API as you mentioned does work(inserts the defaults correctly) but only when a static schema is used, where there is one to one feature mapping. But it gives error (as stated earliar) when a dynamic schema is used.

 

 

@David - The attributes that I am talking about are not coming from reader nor they are created in the workbench, so attribute trimmer and nullreplace wont help as I wont be able to select them.

 

 

Thanks

 

Zubair

 

 

 


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