Skip to main content
Question

Empty attribute after GDB conversion to Postgis


Forum|alt.badge.img

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?

20 replies

redgeographics
Celebrity
Forum|alt.badge.img+50
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)

 

 


Forum|alt.badge.img
  • Author
  • August 25, 2016
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

 

 


redgeographics
Celebrity
Forum|alt.badge.img+50
varr wrote:
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?

 

 


ngoorman
Contributor
Forum|alt.badge.img+3
  • Contributor
  • August 25, 2016

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?


takashi
Evangelist
  • August 25, 2016
I'd like to know what kind of values the 'SUBART' attribute of the source GDB table contains.

 


Forum|alt.badge.img
  • Author
  • August 25, 2016

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!


david_r
Celebrity
  • August 25, 2016

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


Forum|alt.badge.img
  • Author
  • August 25, 2016

Hi David,

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

And I have 0 warnings

 


david_r
Celebrity
  • August 25, 2016
varr wrote:

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?

Forum|alt.badge.img
  • Author
  • August 25, 2016
david_r wrote:
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:

 

 

 

 

 

 

 


Forum|alt.badge.img
  • Author
  • August 25, 2016
varr wrote:

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

 

 


david_r
Celebrity
  • August 25, 2016
varr wrote:
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.

 

 

 


Forum|alt.badge.img
  • Author
  • August 25, 2016
varr wrote:
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.

 

 


Forum|alt.badge.img
  • Author
  • August 25, 2016
varr wrote:
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

 

 


david_r
Celebrity
  • August 25, 2016

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:


Forum|alt.badge.img
  • Author
  • August 25, 2016
david_r wrote:

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

 


david_r
Celebrity
  • August 25, 2016
varr wrote:
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:

 

 

 


Forum|alt.badge.img
  • Author
  • August 25, 2016
varr wrote:
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

 

 


david_r
Celebrity
  • August 25, 2016
varr wrote:
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!

 


tim_wood
Contributor
Forum|alt.badge.img+8
  • Contributor
  • July 3, 2019

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


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