Skip to main content
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

 

 

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

 


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?

 

 

 


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

 

 

 

 


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

 

 

 


Reply