Read/Write with Integration Transformers
Readers and FeatureReaders can both read data locally, with a database, or using a web service:
However, sometimes it's useful to be able to use a transformer to read (or write) to a web or other integrated service. There are various reasons, but a key one is to be able to read a file itself, rather than reading features from it; for example being able to extract a JPEG file from Dropbox and store it as an attribute (rather than reading it as an actual raster feature).
There are multiple transformers in the Integrations category of the Transformer Gallery:
Some of these integration transformers are for reading, writing, or copying files, e.g.,:
|• AutodeskA360Connector||• BoxConnector|
|• DropboxConnector||• FMEServerResourceConnector|
|• GoogleDriveConnector||• OneDriveConnector|
In this example the author is reading a dataset of parks and passing the features to a DropboxConnector:
Each park feature has the name of a JPEG image that is stored in Dropbox. The DropboxConnector transformer is set up to read that image and store it as an attribute (ParkImage) on the feature.
The features are then sent to a PostGIS database - using a FeatureWriter transformer - where the ParkImage attribute is written to a binary (bytea) column.
|As well as fetching files from Dropbox, the DropboxConnector - as with most Connector transformers - is also capable of uploading content as a file.|