question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad SQL query breaks Builder

See original GitHub issue

Context

When a query filters out the_geom column, Builder enters in bad state.

Steps to Reproduce

  1. Go to data tab and modify the SQL query.
  2. Apply a query selecting only one column. For instance, SELECT name FROM airbnb_listings.

Current Result

The applying query is shown ad infinitum. image

The analysis tab is broken. image

SQL API queries fail, but the error is neihert captured nor shown. image

Expected result

  1. An error is shown in the user interface.
  2. Analysis tab is properly rendered.

Browser and version

Chrome

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Jesus89commented, Feb 28, 2018

It seems that:

1reaction
Jesus89commented, Feb 28, 2018

After talking to ramiro, this is the table for the UI messages:

SQL UI message
1 SELECT x FROM Error in SQL query: column “x” does not exist
2 SELECT the_geom FROM The column “the_geom_webmercator” does not exist
3 SELECT the_geom_webmercator FROM The column “cartodb_id” does not exist
4 SELECT the_geom, the_geom_webmercator FROM The column “cartodb_id” does not exist
5 SELECT cartodb_id FROM The column “the_geom_webmercator” does not exist
6 SELECT 1 as x FROM The column “the_geom_webmercator” does not exist
7 SELECT * FROM wrong_table Error in SQL query: relation “wrong_table” does not exist

Also no blank panels and infinite loops.

NOTE: tested in version v4.10.20

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQL Query Help - Bad Data Format Workaround?
I did a COUNTIF in Excel and there are apparently 90 non-zero values in the data. The query SELECT * FROM myData WHERE...
Read more >
Discussion on: When Builder is anti-pattern
Builders are horrible. I've used them mainly in SQL query builder context, but also seen the things you described in the wild.
Read more >
Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >
What are the advantages to using SQL query builders?
Writing SQL by hand is not all that bad by itself, but you start to get issues with escaping and sanitizing and this...
Read more >
Why Are Linked Server Queries So Bad? - Brent Ozar Unlimited
The first thing SQL Server decided to do was a Remote Query – scanning the Posts table across the network, starting from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found