Question

Dataset naming issue with shapefile FeatureWriter and SchemaScanner


Badge

I'm using the new SchemaScanner before writing shapefiles. Until now, I was using a User Parameter to specify the Dataset (destination folder) of the shapefile.

 

I'd like to switch to an attribute to specify the path or just '$(DIR_output_folder)/something-else' but I'm getting an error:

 

FeatureWriter_4 (WriterFactory): MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_4_0_DATASET or SHAPEFILE_DATASET

SchemaScanner_3_Output_-1_493_Player (RecorderFactory): MULTI_WRITER: No dataset was specified for MULTI_WRITER_DATASET or FeatureWriter_4_0_DATASET or SHAPEFILE_DATASET

Translation FAILED with 2 error(s) and 0 warning(s) (0 feature(s) output)

 

It's working fine without the SchemaScanner, but not with it.

 

How can I set up the dataset properly? Is it an encoding issue?

 

image


3 replies

Badge +15

Hi @ts_84​ ,

I understand the FeatureWriter is complaining because the feature arriving doesn't have the 'dest' attribute and therefore no name for the dataset. Notice that you're saying in your SchemaScanner that you want to output the schema feature first and that feature doesn't have any of the attributes of the data features, including this 'dest'. This means the FeatureWriter doesn't know where to write.

There's no way to tell the FeatureWriter it should get the 'dest' value only from the data features, so I would suggest you could join that attribute back in to the schema feature.

Badge

Hi @ts_84​ ,

I understand the FeatureWriter is complaining because the feature arriving doesn't have the 'dest' attribute and therefore no name for the dataset. Notice that you're saying in your SchemaScanner that you want to output the schema feature first and that feature doesn't have any of the attributes of the data features, including this 'dest'. This means the FeatureWriter doesn't know where to write.

There's no way to tell the FeatureWriter it should get the 'dest' value only from the data features, so I would suggest you could join that attribute back in to the schema feature.

Thanks fgiron. That's the thing I'm puzzled about, the 'dest' attribute is there and all the features have it, it's a path 'E:/folder/something'. I was trying to see if the dataset parameter would like it better to just read the value from the attributes instead of having to collate it via 'user_parameter/attribute'. It doesn't like to read from an attribute in this case. I don't get it, usually it's perfectly fine. The attribute is there.

What do you mean by ' join that attribute back in to the schema feature'?

Badge +15

Thanks fgiron. That's the thing I'm puzzled about, the 'dest' attribute is there and all the features have it, it's a path 'E:/folder/something'. I was trying to see if the dataset parameter would like it better to just read the value from the attributes instead of having to collate it via 'user_parameter/attribute'. It doesn't like to read from an attribute in this case. I don't get it, usually it's perfectly fine. The attribute is there.

What do you mean by ' join that attribute back in to the schema feature'?

All features coming from the Output port of the SchemaScanner should preserve all attributes. My guess is that the problem is with the feature coming out of the <Schema> port. That's the one I suspect it doesn't have the 'dest' attribute and is causing the FeatureWriter to fail.

By joining that attribute back I meant to do some kind of join so that schema coming out of the Schema port also has this attribute. Something like this:

join back 

Reply