plotly / falcon

Free, open-source SQL client for Windows and Mac 🦅
https://plot.ly/free-sql-client-download/
MIT License
5.13k stars 279 forks source link

Athena connector never activates Query tab #577

Open technicallyfeasible opened 4 years ago

technicallyfeasible commented 4 years ago

I have an Athena database that I wanted to connect to. The connection itself seems to work but the Query tab stays deactivated.

Investigating the issue in the code, the problem boils down to no tables being returned by the connector and the interface then does not enable the Query tab.

The core issue is this line in the athena connector:

        const tableNames = dataSet.slice(1).map(row => row.Data[0].VarCharValue);

Our Athena database has only a single table so this will return an empty array.

I do not see any reason for this slice(1) to be there and why the first table should not be returned. Can anyone shed some light on this? Generally this should be an easy fix.