Skip to main content

HI,

I'm converting geodatabase GDB files to PostGIS. The table conversion works well but some of the attributes are empty after the conversion (only 5 attributes over 200 in 7 differents tables).

The five attributes don't have the same types.

Does anyone knows where it could come from?

Could you elaborate a bit more please? Are the attribute names exactly the same in the geodatabase and PostGIS (attribute names are case sensitive in FME)

 

 


Yes they are, I'm not changing their names. And if it was because of
their names, all the attributes would be empty after the transfer.

 

 

For example, in this table, all the attribute except SUBART are converted well

 

 


Yes they are, I'm not changing their names. And if it was because of
their names, all the attributes would be empty after the transfer.

 

 

For example, in this table, all the attribute except SUBART are converted well

 

 

Okay, that's odd. I assume you used the Generate Workspace option to set this up, in that case FME will do its best to set the data types correctly as well, but could you doublecheck that to be sure?

 

 


Are you sure that these attributes actually have values in your input data? If they do, could it be that they are too long to fit the output field, and are left out as a result?


I'd like to know what kind of values the 'SUBART' attribute of the source GDB table contains.

 


Indeed, I used the "generate workspace" option.

The source attribute 'SUBART' is of type text and the output of type Varchar. What is strange is that the attribute 'ART' has the same source and output type and is transfering without problem.

No the attribute does have values! And yes sometimes they were too long so I used the transformer AttributeValueMapper and it worked!


The first thing to do would be to fine comb the log for any warnings. Ctrl-F on "SUBART" might be a good idea.


Hi David,

I just did but didn't find anything about subart in the log

And I have 0 warnings

 


Hi David,

I just did but didn't find anything about subart in the log

And I have 0 warnings

 

I'm a bit surprised that SUBART is type text, according to my knowledge of Geonis it should be a long integer 😉 Can you post a print screen here of the feature class field definitions, as well as some of the contents of the feature class?
I'm a bit surprised that SUBART is type text, according to my knowledge of Geonis it should be a long integer 😉 Can you post a print screen here of the feature class field definitions, as well as some of the contents of the feature class?

You are right, in Geonis it is a 'Long Integer' but FME takes it with the type 'text', that could be the problem?

 

 

Here one of feature:

 

 

 

 

 

 

 


You are right, in Geonis it is a 'Long Integer' but FME takes it with the type 'text', that could be the problem?

 

 

Here one of feature:

 

 

 

 

 

 

 

And the feature type in Geonis

 

 


And the feature type in Geonis

 

 

This could be related to something with subtypes and domains.

 

If I'm not mistaken ART is a subtype, but I'm not sure if SUBART has been defined with a domain.

 

Try inserting a breakpoint just before the writer and see what the value for SUBART is really like when it hits the writer.

 

 

 


And the feature type in Geonis

 

 

I just did and it has no values, it is already null. So the problem could come from the writer?

 

 

No subart hasn't been defined with a domain.

 

 


I just did and it has no values, it is already null. So the problem could come from the writer?

 

 

No subart hasn't been defined with a domain.

 

 

Sorry I said wrong, SUBART does have a domain

 

 


I recommend you re-create the reader. In my opinion the SUBART attribute should be of type integer. This is what is looks like when I try to recreate:

Make sure you don't check "Resolve domains" when you create the reader:


I recommend you re-create the reader. In my opinion the SUBART attribute should be of type integer. This is what is looks like when I try to recreate:

Make sure you don't check "Resolve domains" when you create the reader:

But how do you create a reader that way? I don't have the same interface when I create an ESRI reader (maybe I have an older version of FME?)

 


But how do you create a reader that way? I don't have the same interface when I create an ESRI reader (maybe I have an older version of FME?)

 

Click on Parameters when you add the reader:

 

 

 


But how do you create a reader that way? I don't have the same interface when I create an ESRI reader (maybe I have an older version of FME?)

 

Ok I see it now, I was using the reader format "File Geodatabase API" instead of "File Geodatabase ArcObjects".

 

 

So now it is working!! Thanks a lot David

 

 


Ok I see it now, I was using the reader format "File Geodatabase API" instead of "File Geodatabase ArcObjects".

 

 

So now it is working!! Thanks a lot David

 

 

I suspect the API reader isn't a very good choice for Geonis databases, they usually have a lot of functionality in them necessitates the ArcObjects reader.

 

 

Great to hear that it works!

 


If you tick the "Resolve Domains" option, you might think that you don't need to expose the original field in the Reader. But you do! If you un-tick the original field (e.g. un-tick "MyField" and leave only "MyField_resolved" ticked), then you will encounter problems when you try to work with the resolved field. I presume there is some sort of relationship between the two versions of the field that gets broken if both are not exposed.


Reply