fusiontables / fusion-tables-api-samples

Automatically exported from code.google.com/p/fusion-tables-api-samples
18 stars 13 forks source link

Form posts to Fusion Table OK, but running Sync script hourly fails #44

Open glenncjblack opened 9 years ago

glenncjblack commented 9 years ago

Google Form linked to Google sheet. API script instructions (https://fusion-tables-api-samples.googlecode.com/svn/trunk/FusionTablesFormSync/docs/reference.html ) were followed to load data into Fusion Table with lat-long mapping. Users on web can fill the form, and the data goes to the table on Google Drive, then Sync script runs and transfers new data to Fusion Table OK. SYNC script also runs hourly, but fails each time with the following error:

4/4/15 9:25 PM onFormSubmit Problem running SQL: INSERT INTO 1gVZCcMebtTqmX-DvYajVjuHma4lX9FwZjMzyuqXS ('') VALUES (''): Exception: Invalid query: Bad column reference . Looks like the column names in the form do not match the column names in the table. Make sure these match! (line 308, file "Code") time-based 4/4/15 9:25 PM

IN case I made a mistake in instructions, old system was obsoleted, and instructions repeated again to create a new form, sheet, and table; same error repeated.

scottlawrencelawson commented 9 years ago

I have this problem, but for a different reason. My problem is that the sync script times out since I have 1200+ records. You probably have an extra column in your spreadsheet that is blank, created from a form question that was deleted.

epenpen commented 9 years ago

@scottlawrencelawson Did you solve your problem? I have the same error since I have 2200+ rows. I don't know how to have it fixed.

scottlawrencelawson commented 9 years ago

@epenpen No I did not. I just removed the hourly tigger that ran the sync. I don't really NEED sync since my table and map is updated on form submission on at a time and I do not allow form submitters to update their records (a setting in forms). But the sample has the code to do a sync so it would be nice to get it working. I don't have time (or skill!) to figure it out, but I was thinking if the code could only sync rows that have been added or changed since the last sync it would keep the number of records to a minimum, thus avoiding the timeout.

If you are interesting my map and form is here http://goo.gl/062w6r . I'd like to see your work as well!

reimerism commented 8 years ago

I'm having a lot of issues with syncing between the spreadsheet and the fusion table.. Sometimes the maximum execution time is exceeded and other times its not (haven't really found any consistency in this).

I can't seem to figure out the root cause as when I look in the Developer Console it appears I'm making 0.5 or fewer requests per second (lower than the 10 request per second limit). I'm not using the form portion of the code as I just want to make changes to the table from time to time (in some cases daily) and have it sync the changed rows. There are a total of 8 columns, four of which change and the remaining four remain constant. Would limiting the columns it look at make a difference? I don't need it to try and rewrite columns that aren't going to change.

Anyway, any tips on preventing the exceeding limits issues?

jmendietacastillo commented 5 years ago

the link https://fusion-tables-api-samples.googlecode.com/svn/trunk/FusionTablesFormSync/docs/reference.html has fallen, could someone pass it to me?