Issue
Connecting to a DataWA “Esri ArcGIS Server Feature Service” in FME may result in the following error:
ArcGIS Feature Service Reader: Encountered an unexpected error. The error code from the server was '400' and the message was: 'Failed to execute query.'. Details: ''
Affects
FME 2017 and later.
Description
This is caused by the presence of special characters in one or more attributes on a dataset. Most commonly, this will be the bracket characters in the st_area(shape) and st_length(shape) attributes that are generated by the DataWA Data Upload Tool’s data load process.
The root cause of this issue is unknown at this stage. The issue has been logged with Safe Sotware who are putting together an internal bug report for their development team to investigate.
Workaround
Option 1
Open the properties of the ArcGIS Feature Service Reader in FME and choose the “All Attributes” option.
This works around the issue in the background by sending a wildcard character (*) for the outFields property of the Feature Service API.
Option 2
Check the “Exposed Attributes” option and untick any “st_area” and “st length” attributes.