Is there way to union two Google Fusion tables into one view, or insert rows from one table to another?
I have multiple tables that are quite large, and are updated in bulk. It would be extremely useful if I could work in sm开发者_StackOverflow社区aller chunks at my end, then combine them at the Google end.
A view with a union would solve this, as would the ability to insert from another table into a common table. Do such functions exist?
Unfortunately, no. Here's the feature request for it: https://code.google.com/p/fusion-tables/issues/detail?id=930
I guess it's worth trying a hack like:
- Create a master table "MasterTable" with column "Group" and values A, B, C. That's 3 rows in total.
- Have table MySubsetA containing a subset of 20 rows of your data. Add a column "MasterGroup" to it and set the value in all the rows to be 'A'.
- Have table MySubsetB containing a different subset of 20 rows of your data. Add a column "MasterGroup" to it and set the value in all the rows to be 'B'.
- Same for Table MySubsetC with 20 rows of 'C'.
Then merge all the tables, starting with MasterTable.
I'd be interested to know if the behaviour would be to end up with 60 rows due to the duplicate matches on 20 As, 20 Bs and 20 Cs.
Even if that worked, it only allows for a very simplistic union of the tables. Without being able to manipulate the column names from the source table to the target view there's very few use cases that will be covered.
In any case, you're almost certainly best off maintaining your data in a single column and building your own tools (in Javascript, most probably), to help you manipulate the data as if it were a group of subsets.
If you're using Fusion Tables just to get entries on a Google Map, you could consider unioning at the map layer and having multiple Fusion Table layers. This is the wrong conceptual layer to union at, of course, but if it fits your use case nicely it's an option.
Subject to columns in the data sources being similar, you can achieve this by importing more rows into your fusion table (File->Import More Rows). This works, although, unlike SQL, may not offer the ability to limit duplicates etc.
In Fusion Tables UI there is a menu item named "Merge" which allows you to merge two fusion tables into one.
精彩评论