I'm trying to diagnose issues updating Google Fusion Tables using CSV data via the API. Everything seems to work correctly code side of things with no errors reported but the data does not reflect the changes. Any ideas how I can diagnose what is going wrong?
I've been using the Google.Apis.Fusiontables.v2 C# libraries (v1.27.1.833 is latest I've tried) to update a fusion table daily. The process was working seamlessly for quite a while, but now no longer seems to work. I suspect the process has been broken for a month or more now.
Everything seems to work from the code side of things, no errors reported. I've also been debugging the process from within Visual Studio with no problems indicated - it just seems to work from the client side.
In case it's useful the C# method I'm using is:
fusiontablesService.Table.ReplaceRows(tableId, stream, "application/octet-stream").Upload();
The table I am attempting to update is - https://fusiontables.google.com/DataSource?docid=1ndrFm1g0iZpz5gszjz5Ij9r_KiQbNYRXVM2JNfv3
The UpdatedUtc
column indicates that a few updated rows are getting through, but not all of them.
If I export my CSV stream to a physical file and created a new Fusion Table manually via the web UI this works perfectly and shows all the missing data I expect to be there.
Here's the zipped CSV file in case it's useful - http://www.paydirt.co.nz/stackoverflow/GoldPermits.zip
This is the test Fusion Table I imported the CSV file manually into - https://www.google.com/fusiontables/DataSource?docid=1Udnre88O8e1zokvnhrkmqdY7BbYD2OQtELdyz3uG
Example of missing data in the live table updates:
Compared to the test table created from the same data:
The PERMIT_NUMBER
's for the 2 missing rows in the example are 60304 and 60247.
Any ideas how I can investigate further what might be going wrong? Maybe there's some logs or logging options available somewhere I'm unaware of?
Any help / ideas to explore is greatly appreciated.
Upload from fusiontablesService.Table.ReplaceRows(...).Upload()
returns a Google.Apis.Upload.ResumableUpload.ResumableUploadProgress
object which has both aStatus
and Exception
property that can be checked.
In my case I was getting the following progress result:
{Google.Apis.Upload.ResumableUpload.ResumableUploadProgress}
BytesSent: 10485760
Exception: {"Google.Apis.Requests.RequestError\r\nContent has a different number of columns than the table (line 1). [400]\r\nErrors [\r\n\tMessage[Content has a different number of columns than the table (line 1).] Location[ - ] Reason[badImportNumColumnsMismatch] Domain[fusiontables]\r\n]\r\n"}
Status: Failed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With