Partial fix to #205. Attempt to use the layer's sql in its options, if this fails create the sql statement as it was previously.
The current way of creating sql statements often fails because the layer name is used as the table name, but these often do not match (I'm assuming because the CartoDB UI changed to allow customizing layer names).
Partial fix to #205. Attempt to use the layer's sql in its options, if this fails create the sql statement as it was previously.
The current way of creating sql statements often fails because the layer name is used as the table name, but these often do not match (I'm assuming because the CartoDB UI changed to allow customizing layer names).