Skip to main content

Hi there.

I was trying a simple task to download a csv file from S3 and convert to a shapefile.

I could download files with S3 Downloader and narrowed down to my target CSV file with StringSearcher. Then, I used FeatureReader to read the target CSV but I couldn't bring any attributes in the CSV file with this process. I am hoping I expose all attributes including latitude and longitude. Then I want to generate geometries from those lat & long with all attributes.

When I run the above workspace, then I got no attribute like below. The process itself was successful though.

Here is my original CSV table I was working on.

When I create a Creator---FeatureReader workflow with a local csv file, I didn't have any problem to include (expose) all attributes.

Why I am missing all attributes when I download a csv file from S3 but didn't happen with a local csv file? What I am missing here??

Please give me some advice!

Thank you.

@hirooimaki

Hi @hirooimaki, since the attribute names in the CSV table are not known when you create the workspace, FME Workbench (FeatureReader) won't expose attribute names automatically. However, the FeatureReader will read all the attributes at run-time. You can check them on the Feature Information window in FME Data Inspector. Try selecting a row in the Table View.

If you know field names in the CSV table, you can expose them via the Attributes to Expose parameter in the FeatureReader or an AttributeExposer transformer on the subsequent workflow.


Hi @hirooimaki, since the attribute names in the CSV table are not known when you create the workspace, FME Workbench (FeatureReader) won't expose attribute names automatically. However, the FeatureReader will read all the attributes at run-time. You can check them on the Feature Information window in FME Data Inspector. Try selecting a row in the Table View.

If you know field names in the CSV table, you can expose them via the Attributes to Expose parameter in the FeatureReader or an AttributeExposer transformer on the subsequent workflow.

@takashi Thank you for your quick reply as usual! So, I added several attribute names to the <Generic> Port column in the FeatureReader. Then I could read the attributes I specified. Great!

 

Then, is there anyway I can dynamically specify all attributes in my csv file??

 

Thank you!

 

 

 


Hi @hirooimaki, since the attribute names in the CSV table are not known when you create the workspace, FME Workbench (FeatureReader) won't expose attribute names automatically. However, the FeatureReader will read all the attributes at run-time. You can check them on the Feature Information window in FME Data Inspector. Try selecting a row in the Table View.

If you know field names in the CSV table, you can expose them via the Attributes to Expose parameter in the FeatureReader or an AttributeExposer transformer on the subsequent workflow.

There is no way to expose attribute names automatically unless the source dataset can be specified when creating the workspace.

 

However, you can configure destination schema dynamically using the schema feature(s) output from the <Schema> port of the FeatureReader, even though no attribute names are exposed on the Workbench interface. Just connect the <Schema> port and the dynamic writer feature type.

 

See also here and articles belonging to Tutorial: Dynamic Workflows, to understand how FME configures destination schema dynamically.

 


Reply