Skip to main content
Solved

Hacking schema features for dynamic output ?


lifalin2016
Contributor
Forum|alt.badge.img+29

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.

Best answer by nielsgerrits

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 

View original
Did this help you find an answer to your question?

7 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • April 28, 2021

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 


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • April 28, 2021
nielsgerrits wrote:

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 ?

 


nielsgerrits
VIP
Forum|alt.badge.img+54
lifalin2016 wrote:

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.


richardatsafe
Safer
Forum|alt.badge.img+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.


virtualcitymatt
Celebrity
Forum|alt.badge.img+38
nielsgerrits wrote:

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​


wakamput
Participant
Forum|alt.badge.img
  • Participant
  • July 11, 2024

When you added the "job ID," it might've thrown off the schema's structure, causing the writer to misinterpret the feature type.


wakamput
Participant
Forum|alt.badge.img
  • Participant
  • July 12, 2024
wakamput wrote:

When you added the "job ID," it might've thrown off the schema's structure, causing the writer to misinterpret the feature type.

One thing that helped me in a similar situation was following an online tutorial. I found some great resources on guidedhacking.com. They have a lot of step-by-step guides that can help you understand the nuances of manipulating schema features.
Also, double-check that your attribute list changes are consistent across all parallel streams.


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