CartoDB/cartodb — pull request #1344 by juanignaciosl (2014-12-03 08:31:02+00:00)
Title: Possible improvement for table queries support (nomerge)

I've done this changes while trying to support this kind of queries:
```
https://www.google.com/fusiontables/embedviz?viz=GVIZ&t=TABLE&q=select+col1%2C+col2%2C+col3+from++where+col1+in+('Minnesota'%2C+'Mississippi')&containerId=googft-gviz-canvas
```
With this change it gets translated to:
```
https://www.google.com/fusiontables/exporttable?query=select+col1%2C+col2%2C+col3+from++where+col1+in+('Minnesota'%2C+'Mississippi')
```
Which is a downloadable CSV just like normal Google Fusion Tables URLs with docid are. Nevertheless the geom field is like this:
```
name,id,geometry
Minnesota,MN,"-96.572156,46.124864 -96.572181,46.12491 -96.571996,46.125285 -96.571922,46.125444 -96.571914,46.125465 -96.57171,46.12567 -96.571299,46.125911 -96.570819,46.125969
...
-88.52806,34.99583,0.0"
```
Which is not importable:
```
Error creating the_geom: PG::Error: ERROR: parse error - invalid geometry\nHINT: \"