Skip to main content

I have manage to export shp in file geodatabase with datasets but now it seems that i have a strange problem (or bug).

every shp that i have exported is missing 1st entry in geodatabase. lets say a shp file has 10 points then i’ll get only 9 points in gdb and the one is missing is always the 1st pont in shp file. every shp file is missing that 1st entry.

the strange thing is that fme shows in information that it wrote all entries that the shp files has but somehow 1 is missing.

there is absolutly no error in logs. i get some info about some fields that i don’t export anyway. i really have no idea why this is happening.

the shps are also exported with FME from othe types of data.

for writer i use Esri Geodatabase (File Geodb Open API) with some schemas that i read from a template database with featurereader and join it on shps (no schema was readed).

so what im doing wrong?

why there is no error about the missing entries?

i think that the 1st entries in shp files are use to create tables and the data is discarded. i use sampler for 1st entry in parallel and i have no problem with the result of gdb but this definitely is not the right way to do it. i just use it for testing purpose.


i was wrong. it seems that this bug is present regardless of create/use existing/truncate tables. it just ignores the 1st entry in every shp files.


Not sure what you are experiencing, but I can’t relate to it.

Any warnings or errors in the log?

Can you printscreen your workflow or share your workspace?


here is a reduce workspace screenshot. it says 2 feature went intro writer but i get only 1 feature in dgb. if i have only 1 feature in shp file i have no entry in gdb.

and the log is like this

Warning - No readers were found to be part of the Multi-Reader, so no data will be read.

Error - BADNEWS: File C:\Program Files\FME\metafile\MULTI_WRITER.fmf could not be opened (tabrdr.cpp:161)


What you need to change is you need to feed the Schema feature from FeatureReader_2 directlty in the reader, instead of merging it to the data features. Because you merged it, the reader is indeed using the first data feature to create the structure.

It is also important that the Schema Features reach the writer first, because the data can’t be written without a schema when dynamic. To force this, I use AttributeCreators just before the writer to create an attribute with the name “Order” and a value 1 in the schema feature stream, and a 2 in the data feature stream followed by a Sorter, which sorts on the value Order, numeric asc.

And I think the value of fme_feature_type in the data features need to be the same as the value fme_feature_type_name in the schema features, for the writer to understand which schema feature belongs to the data feature.


@nielsgerrits i’ve read in help files and forum that schema needs to be first. i’ve tried to add it separately to geodatabase directly but still lose the entries. i never thought of “sort” idea.

 

 

thank you


Cheers 🙂 If you like these kind of workflows, the SchemaScanner is also a nice transformer, it generates a SchemaFeature from the data.


@nielsgerrits i have a hard time to understand exactly how schema works. but i will look more into it


The schema feature contains info about geometry type & attributes and their properties, in a list. This helps in workflows with ever changing sources and the need of flexibel, dynamic outputs. That’s about it I think :)


Reply