Solved

Hacking schema features for dynamic output ?


Userlevel 1
Badge +22

Hi list.

I'm tasked with importing a lot of feature sets, each with its own set of fields/attributes. So I'm using dynamic output mode, utilizing the schema features read.

Unfortunately the request is to add a "job ID", so I tried to append an entry to the attribute list of the schema features, but suddenly the proces fails, not recognizing the schema features anymore. And this without changing anything in the data features flow nor the writer.

An example of the error message is:

Microsoft SQL Server Spatial Writer: A feature has arrived with 'fme_feature_type' of DAF_DAGI.afstemningsomraade_908308, but the feature type is not recognized. Halting translation

My writer setup is shown in the attached image. Why does the writer suddenly confuse the fme_feature_type with the requested table name ?

Or is the error message false/misleading ?

The "fme_feature_type" of the data features are the exact same, I just manipulated the schema features in a parallel "stream".

Any insights are appreciated.

Cheers.

icon

Best answer by nielsgerrits 28 April 2021, 09:13

View original

5 replies

Userlevel 6
Badge +31

Not sure why this does not work, but the easy way would be to just add "job ID" in the writer.

2021-04-28_09h11_39 

Userlevel 1
Badge +22

Not sure why this does not work, but the easy way would be to just add "job ID" in the writer.

2021-04-28_09h11_39 

Hi Niels.

So you can have both dynamic and manually added column in the same setup ??

Will this add an extra field "job_ID" to every single (and structurally different) dataset I read/output ?

 

Userlevel 6
Badge +31

Hi Niels.

So you can have both dynamic and manually added column in the same setup ??

Will this add an extra field "job_ID" to every single (and structurally different) dataset I read/output ?

 

Yes sir. I think this is the way it is designed.

I can imagine the use of schema file hacking, when you want to dynamically add columns, but for static fields I would use the other way.

Badge +10

Hi @Lars I Nielsen​ ,

 

In this tutorial we dynamically alter a schema feature to use in the writer. If you JobID is constant then you should be able to use this workflow by extract the schema features with a FeatureReader.

Userlevel 4
Badge +26

Not sure why this does not work, but the easy way would be to just add "job ID" in the writer.

2021-04-28_09h11_39 

Was going to say the same thing! This should work​

Reply