Skip to main content
Question

Error using dynamic writer: POSTGRES Writer: Fanout for feature type '...' failed to find feature type template '...'


dsign-world
Contributor
Forum|alt.badge.img+2
POSTGRES Writer: Fanout for feature type 'SQLCreator' failed to find feature type template 'schema_from_query'
POSTGRES writer: An error has occurred. Check the logfile above for details

I tried to create a workspace using a dynamic writer (see attachment) but I get the error above. The writer uses following parameters:

  • Table Name: `@Value(fme_feature_type)`

    The `fme_feature_type` attribute contains the value `SQLCreator` on my features because I use an SQLCreator to read the features.
     
  • Schema Sources: `Schema From Schema Feature`

    I’m using the schema feature from the SQLCreator.
     
  • Schema Definition Name: `schema_from_query`

    I think the schema definition name refers to the attribute called `fme_feature_type_name` on the schema feature. This attribute contains the value `schema_from_query` when using the schema feature from the SQLCreator. I have also tried to leave the Schema Definition Name field empty in the settings of the dynamic writer’s feature type. In this case it defaults to `Default from table name above`. But I get the same error message except that it says “failed to find feature type template 'SQLCreator'” instead of “failed to find feature type template 'schema_from_query'”.

I think the documentation for the Schema Definition Name option (see About Dynamic Workspaces) is really poor:

Schema Definition Name: Defines how elements in the schema definition of the feature type are named. By default, schema elements are named based on the feature type name, under General Parameters. Alternatively, you can name schema elements based on a specified attribute.

Defines how elements in the schema definition of the feature type are name?

What elements does this refer to??? I think this is worded very poorly.

I assume it refers to the `fme_feature_type_name` attribute on a schema feature. I guess the Schema Definition Name option is useful if you want to write multiple tables using a single writer and you have multiple schema features because the tables have different schemas. Then your actual data features need an attribute which tells FME which schema feature belong to which data features. This attribute should hold the same value as the `fme_feature_type_name` attribute on the corresponding schema feature.

Since my schema feature from the SQLCreator has a `fme_feature_type_name` of `schema_from_query`, I set `schema_from_query` as a constant value for the Schema Definition Name option.

But I still get the error message from above, which tells me that FME failed to find the feature type template ‘schema_from_query’. From my understanding, the log tells me that FME failed to find a schema feature with the `fme_feature_type_name` attribute containg the value `schema_from_query`.

I don’t understand why I get this error. Can someone explain why?

 

Offtopic: I have no idea what the correct category for this post is supposed to be. You can only choose between “Authoring”, “Data”, “Integration” and “Transformers”. I think Authoring and Data pretty much apply to any FME workspace.

5 replies

dsign-world
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 26, 2025

I found the cause of the problem. The cause of the problem is that my schema feature from the SQLCreator is missing the `fme_geometry{}` list attribute. I don’t understand why this list attribute is required and not provided by the SQLCreator’s schema feature. This makes the schema feature from the SQLCreator pretty much useless. In my opinion this behavior should be fixed.

Apart from the fact that my schema feature is missing the `fme_geometry{}` list attribute, there is a different problem with FME: FME displays an incorrect error message in certain situations.

1. If you execute the whole workspace, you get the following error messages:

MULTI_WRITER: Geometry type is required for POSTGRES feature type 'Tabelle1' (POSTGRES_1), but no geometry was specified in the schema feature using attributes named 'fme_geometry{n}'
POSTGRES Writer: Fanout for feature type 'SQLCreator' failed to find feature type template 'd_y_n'
POSTGRES writer: An error has occurred. Check the logfile above for details

This tells me that the `fme_geometry{}` list is required but doesn’t exist on my schema feature. This error message makes sense and is correct.

2. However, when I execute only the SQLCreator with feature caching and then execute only the writer, you receive only the following error messages:

POSTGRES Writer: Fanout for feature type 'SQLCreator' failed to find feature type template 'schema_from_query'
POSTGRES writer: An error has occurred. Check the logfile above for details

This error message is misleading and incorrect because the true problem is NOT that the value of the `fme_feature_type_name` attribute is wrong which you provide in the Schema Definition Name option of the writer’s feature type parameters. The actual problem is that the `fme_geometry{}` list attribute is missing on my schema feature and FME doesn’t display this in the transformation log. For some reason the error message

“MULTI_WRITER: Geometry type is required for POSTGRES feature type 'Tabelle1' (POSTGRES_1), but no geometry was specified in the schema feature using attributes named 'fme_geometry{n}'”

is missing in the transformation log when I execute each transformer step-by-step with feature caching.

 

In my opinion this is a bug, because the log doesn’t display the same information in both scenarios although the workspace is exactly the same. In the second scenario the log misses the correct error message (the first line) and only displays two arbitrary error messages which are not the real cause of the problem (line 2 and 3).


nielsgerrits
VIP
Forum|alt.badge.img+53

You are probably right. I believe the best way to get the attention of Safe Software is to submit a ticket.See https://support.safe.com/hc/en-us/p/Support

A workaround I can think of is to use the SchemaScanner to generate the Schema Feature instead.


dsign-world
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 26, 2025
nielsgerrits wrote:

A workaround I can think of is to use the SchemaScanner to generate the Schema Feature instead.

 

SchemaScanner is not what I’m looking for. I want to use the Schema from my Postgres table (which is provided with the schema feature of the SQLCreator) and not a schema that is determined by FME at runtime.

In case a column is empty, the SchemaScanner would not add this column/attribute to the schema feature, although it exists in the schema of my Postgres table but I want to get the same schema as used in my Postgres table.

So I guess I have to manipulate the schema feature of the SQLCreator to manually add the `fme_geomatry{}` list for each attribute although my features don’t have any geometry, so I’ll set the value to `fme_no_geom` for each attribute.


dsign-world
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 26, 2025
nielsgerrits wrote:

You are probably right. I believe the best way to get the attention of Safe Software is to submit a ticket.See https://support.safe.com/hc/en-us/p/Support

 

I don’t know how to use this site. When I click on Submit Ticket or My Tickets, I’m being redirected to https://support.safe.com/hc/en-us/signin?return_to=https%3A%2F%2Fsupport.safe.com%2Fhc%2Fen-us%2Frequests%2Fnew.

When I click on Sign In in the upper right corner, I’m also redirected to https://support.safe.com/hc/en-us/signin?return_to=https%3A%2F%2Fsupport.safe.com%2Fhc%2Fen-us%2Frequests%2Fnew, so it’s impossible to sign in. Clicking on Sign in only leads to this page where I cannot enter any sign in credentials.

Also, I don’t understand why I can see a Sign In button in the upper right corner. I’m already signed in on https://community.safe.com. Why would I need to Sign in again?


nielsgerrits
VIP
Forum|alt.badge.img+53

  

dsign-world wrote:
nielsgerrits wrote:

A workaround I can think of is to use the SchemaScanner to generate the Schema Feature instead.

 

SchemaScanner is not what I’m looking for. I want to use the Schema from my Postgres table (which is provided with the schema feature of the SQLCreator) and not a schema that is determined by FME at runtime.

In case a column is empty, the SchemaScanner would not add this column/attribute to the schema feature, although it exists in the schema of my Postgres table but I want to get the same schema as used in my Postgres table.

So I guess I have to manipulate the schema feature of the SQLCreator to manually add the `fme_geomatry{}` list for each attribute although my features don’t have any geometry, so I’ll set the value to `fme_no_geom` for each attribute.

Clear, manually adding the geometrytype sounds like the workaround you need.

 

dsign-world wrote:
nielsgerrits wrote:

You are probably right. I believe the best way to get the attention of Safe Software is to submit a ticket.See https://support.safe.com/hc/en-us/p/Support

 

I don’t know how to use this site. When I click on Submit Ticket or My Tickets, I’m being redirected to https://support.safe.com/hc/en-us/signin?return_to=https%3A%2F%2Fsupport.safe.com%2Fhc%2Fen-us%2Frequests%2Fnew.

When I click on Sign In in the upper right corner, I’m also redirected to https://support.safe.com/hc/en-us/signin?return_to=https%3A%2F%2Fsupport.safe.com%2Fhc%2Fen-us%2Frequests%2Fnew, so it’s impossible to sign in. Clicking on Sign in only leads to this page where I cannot enter any sign in credentials.

Also, I don’t understand why I can see a Sign In button in the upper right corner. I’m already signed in on https://community.safe.com. Why would I need to Sign in again?

Not sure what is off here, I’m redirected to https://sso.account.safe.com/. When logged on, I can choose Support to get back to the page with submit ticket.

I’ll submit a case for now.


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