Google Fusion Tables (Spatial) Reader/Writer (Service Ends December 3, 2019)
Licensing options for this format begin with FME Professional Edition.
Note: As announced by Google on December 11, 2018, Google Fusion Tables and the Fusion Tables API will be turned off on December 3, 2019. Some users may start to see errors in August 2019. Fusion Tables support will be removed from FME after the service has been shut down.
How to Migrate Data: See Safe Software's Blog Post: 7+ Google Fusion Tables Alternatives.
The Google Fusion Tables Reader/Writer (Spatial) enables FME to read and write both attribute and geometric data stored in a Google Fusion Table.
Overview
Google Fusion Tables enables users to easily upload and manage data in the cloud (for example, spreadsheets and comma-separated value [CSV] files).
Google Fusion Tables makes it easy to create visualizations like maps, timelines and other charts, and either share these with collaborators or make them publicly accessible. Users can also merge datasets that belong to different owners.
It offers a REST API to run SQL-like queries to manage tables (create, delete), manage data rows (insert, update, delete), and query the table for all rows that match spatial or data conditions. The results of queries can be output to a CSV file, or used in the Google Maps API or Google Chart Tools.
There are two versions of the reader and writer:
- Google Fusion Tables Non-spatial, which supports all the column types as attributes,
- Google Fusion Tables Spatial which, for convenience, creates geometry from location columns
Both versions can read from and write to private and public tables.
Authentication
Older Authentication Methods
With FME Release b13262, the Google Fusion Table Spatial and Non-Spatial formats used the Google Fusion Tables v1.0 (OAuth 2.0 authentication). For backwards compatibility, refresh token handling authentication remains valid.
These formats previously used the Google Fusion Tables SQL API to access data using a Google account e-mail address and password; however, as of January 2013, this API is deprecated.
To obtain a refresh token: Click the browse button next to the Refresh Token field in the reader or writer parameters dialog.
It is recommended that you save the defaults (from the Defaults button on the dialog) once the refresh token is retrieved so you will not have to re-authenticate in the future. You will need to re-add the reader or writer to older workspaces so they will run properly.
Please note that only KML geometry or latitude/longitude points in the same column will be interpreted as geometry by the Google Fusion Tables Spatial Reader, although multiple latitude and longitude columns or geocoded data will be preserved as attributes for subsequent processing.
The FME Google Fusion Tables Reader can read geometric portions of private or public tables when present, or non-geometry or attribute processing when no location columns are present.
Reader Overview
The Google Fusion Table (Spatial) Reader produces an FME feature for each row in a worksheet in the provided spreadsheet.
- The reader will create geometry from KML data or latitude/longitude data in the same column.
- The reader cannot handle geocoded location data or latitude/longitude data in two separate columns.
- All columns of the Google Fusion Table will appear as attributes in the feature type, including all location columns.
Google Fusion Tables allows for blank and duplicate column names. Inside FME, blank column names will be given the name col. Subsequent blank columns will be given the names col0, col1, etc. If there are duplicate column names, the first instance will retain the original name while any following duplicates will have a number starting at 0 appended to the name.
Public tables can be accessed by appending table IDs (space delimited) to the Table List text box inside the Reader parameters dialog.
Note: The Google Fusion Tables (Spatial and Non-Spatial) formats do not use a dataset like most other formats. Instead, connection parameters are supplied similar to a database connection by clicking the Parameters button when generating a new workspace, or adding a reader. The screenshot below shows the reader parameters after the Named Connection has been authenticated.
Note:
The reader tables must be defined in the workspace before they can be read or written. Note that the table cannot be changed once generated, since this determines the feature types.
Support for @SQL and @Relate functions has not yet been added.
Writer Overview
The Google Fusion Tables (Spatial) Writer produces a Google Fusion Table with a row for each feature. New tables can be created for each specified feature type or, alternatively, rows can be written to existing tables that match the feature type names. In both cases, features may cause rows to be inserted into the table and additionally existing tables can have rows updated or deleted based on matching input features based on key update columns.
Please note that the Google Fusion Tables Spatial writer will only write KML geometry as attributes of the feature.
Google Fusion Tables allows for blank and duplicate column names. Blank columns cannot be written to with a writer and duplicate columns will receive the same value. Unique named columns are always used when creating tables.
Note: It is recommended that existing table columns be provided with unique names before writing to them. This is a simple step through the Google Fusion Tables web interface under Edit > Modify Columns.
Public tables can be written to if access permissions allow by specifying the numeric table identifier as the name of the writer feature type.