Skip to main content

Hi list.

I'm attempting to use a FeatureWriter to write som ESRI Shape files, wanting to utilize the schema features from the (WFS) input (read with FeatureReader) to enable dynamic schema based output.

I have selected "Schema from schema features" for source and "fme_feature_type_name" for definition name. And both schema and data features arrive at the same port in FeatureWriter.

However, the workspace fails immidiately when FeatureWriter receives the first schema feature, and long before any data features arrive.

Why does FeatureWriter fail when receiving a single schema feature? I would have expected it to just keep it (them) until any data features arrive ?

Is dynamic schema definition driven output at all possible with FeatureWriter ?

Any help is appreciated.

Here's the error part of the log file:

2021-06-04 11:18:38|   8.0|  0.1|INFORM|Creating writer for format: 
2021-06-04 11:18:38|   8.0|  0.0|INFORM|Using MultiWriter with keyword `FeatureWriter' to output data (ID_ATTRIBUTE is `multi_writer_id')
2021-06-04 11:18:39|   8.5|  0.5|ERROR |FeatureWriter (WriterFactory): MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_0_DATASET or SHAPEFILE_DATASET
2021-06-04 11:18:39|   8.5|  0.0|ERROR |MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_0_DATASET or SHAPEFILE_DATASET
2021-06-04 11:18:39|   8.5|  0.0|ERROR |PDK_Lokalplaner (QueryFactory): A fatal error has occurred. Check the logfile above for details

 


Here's the error part of the log file:

2021-06-04 11:18:38|   8.0|  0.1|INFORM|Creating writer for format: 
2021-06-04 11:18:38|   8.0|  0.0|INFORM|Using MultiWriter with keyword `FeatureWriter' to output data (ID_ATTRIBUTE is `multi_writer_id')
2021-06-04 11:18:39|   8.5|  0.5|ERROR |FeatureWriter (WriterFactory): MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_0_DATASET or SHAPEFILE_DATASET
2021-06-04 11:18:39|   8.5|  0.0|ERROR |MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_0_DATASET or SHAPEFILE_DATASET
2021-06-04 11:18:39|   8.5|  0.0|ERROR |PDK_Lokalplaner (QueryFactory): A fatal error has occurred. Check the logfile above for details

 

Here is some info from the inspector on the offending schema feature:

 

2021-06-04 11_50_25-Window


My guess is this might be caused by different formats having different schema types? I can imagine long attributenames in the WFS doesn't work for Esri Shape. But I'm not sure.

 

I can confirm that dynamic schema definitions do work with FeatureWriters as I use this a lot.


My guess is this might be caused by different formats having different schema types? I can imagine long attributenames in the WFS doesn't work for Esri Shape. But I'm not sure.

 

I can confirm that dynamic schema definitions do work with FeatureWriters as I use this a lot.

Thanks Niels.

It's a good guess, since the WFS does have long attribute names (plus the *.xsi fields that FME adds), and they get perfectly mangled in Shape. Shape was requested as output, but is clearly not recommendable.

I did however have an alternative setup, MapInfo TAB, where field names can have up to 31 characters. Unfortunately this didn't remedy the problem, FeatureWriter exploded the same way as before.

I will investigate the avenue a little further.

 


Here's the error part of the log file:

2021-06-04 11:18:38|   8.0|  0.1|INFORM|Creating writer for format: 
2021-06-04 11:18:38|   8.0|  0.0|INFORM|Using MultiWriter with keyword `FeatureWriter' to output data (ID_ATTRIBUTE is `multi_writer_id')
2021-06-04 11:18:39|   8.5|  0.5|ERROR |FeatureWriter (WriterFactory): MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_0_DATASET or SHAPEFILE_DATASET
2021-06-04 11:18:39|   8.5|  0.0|ERROR |MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_0_DATASET or SHAPEFILE_DATASET
2021-06-04 11:18:39|   8.5|  0.0|ERROR |PDK_Lokalplaner (QueryFactory): A fatal error has occurred. Check the logfile above for details

 

Can you check if every feature has a _pathname value? Maybe _pathname interferes with a fme technical attribute?


Thanks Niels.

It's a good guess, since the WFS does have long attribute names (plus the *.xsi fields that FME adds), and they get perfectly mangled in Shape. Shape was requested as output, but is clearly not recommendable.

I did however have an alternative setup, MapInfo TAB, where field names can have up to 31 characters. Unfortunately this didn't remedy the problem, FeatureWriter exploded the same way as before.

I will investigate the avenue a little further.

 

Can you test to write dynamically to FFS? At least that must be working, if it doesn't something else is wrong.


Can you check if every feature has a _pathname value? Maybe _pathname interferes with a fme technical attribute?

As I tried to describe, no data features ever reach the FeatureWriter before it breaks down. It crashes as soon as the very first schema feature arrives from the FeatureReader(WFS), so data features are not even involved.

Isn't Dynamic Schema Definition not only defined in the "Parameters" tab ?

The schema features do not have a variable named "_pathname", only the data features do (it's set in an AttributeCreator just before FeatureWriter).

The schema features all have a variable named "fme_feature_type_name", which I reference in my setup (see original image).


Thanks Niels.

It's a good guess, since the WFS does have long attribute names (plus the *.xsi fields that FME adds), and they get perfectly mangled in Shape. Shape was requested as output, but is clearly not recommendable.

I did however have an alternative setup, MapInfo TAB, where field names can have up to 31 characters. Unfortunately this didn't remedy the problem, FeatureWriter exploded the same way as before.

I will investigate the avenue a little further.

 

No luck, it fails in the very same manner.


Does it work if you try to use any other format than Shape? E.g. FFS?


Thanks Niels.

It's a good guess, since the WFS does have long attribute names (plus the *.xsi fields that FME adds), and they get perfectly mangled in Shape. Shape was requested as output, but is clearly not recommendable.

I did however have an alternative setup, MapInfo TAB, where field names can have up to 31 characters. Unfortunately this didn't remedy the problem, FeatureWriter exploded the same way as before.

I will investigate the avenue a little further.

 

Can you try this sample? It downloads one feature from a WFS and writes it to FFS.


Does it work if you try to use any other format than Shape? E.g. FFS?

Unfortunately it still fails when using FFS as output format. I don't think it's format related.


Unfortunately it still fails when using FFS as output format. I don't think it's format related.

Sounds like you may want to consider sending your workspace to Safe support.


I've added another question about schema features, and this query is a specialized case of a more general case.

So I'm closing this question.


Reply