edgedb
edgedb copied to clipboard
SQL support for Tableau (declare cursor)
- EdgeDB Version:3.1
- EdgeDB CLI Version: none
- OS Version:macOS Ventura 13.1
Steps to Reproduce: I am using Tableau Desktop client and have connected it to the edgeDB PostgreSQL connector for my local server. It is able to fetch the list of schemas, but throws an exception when configuring the chart (see the screenshot at the bottom). Upon investigation, I found that it may not yet support cursor queries, such as:
DECLARE my_cursor CURSOR FOR
SELECT proj_code, proj_status
FROM appczjniw005."Project";
OPEN my_cursor;
FETCH NEXT FROM my_cursor INTO @proj_code, @proj_status;
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'Project Code: ' + @proj_code + ', Project Status: ' + @proj_status;
FETCH NEXT FROM my_cursor INTO @proj_code, @proj_status;
END;
CLOSE my_cursor;
DEALLOCATE my_cursor;
However, I have reviewed the official documentation of edgeDB, and it mentions that Tableau has been tested. I couldn't find any configuration to disable cursor queries either.
I would like to confirm if this is a bug?
Attached are the relevant screenshots:
Schema:none
Just talked with someone about this, and we'll need to have a discussion with the team about it. Adding support for cursors will not be trivial.
In the meantime, you may want to move your data into a Postgres instance and connect that to Tableau. You can use pg_dump
and then restore the dump to a Postgres database, or you can use AirByte or Fivetran (or something like them).
Looking at this issue, I'm a bit confused.
@Jady891213 Where is the code snippet you've attached coming from? Is this query being issued to EdgeDB over SQL adapter?
If so, you've probably misconfigured your connector to use "Microsoft SQL Server adapter" instead of "PostgreSQL adapter".
I'm saying that because the snippet contains syntax that is not supported by PostgreSQL (WHILE
, PRINT
) and will not be supported by EdgeDB.
We've discussed supporting PostgreSQL cursors and it should be quite easy to do, if we limit to only NO SCROLL
cursors.
I remember it was still working last time, but I just tested it now and it's definitely showing some abnormalities. It's okay, I just wanted to find out the tutorial or documentation for using the Tableau desktop client. I couldn't figure it out myself.
The query file you posted contains syntax that is not supported. More specifically, FETCH NEXT FROM
, WHILE
, BEGIN
and END
will never be supported by EdgeDB. DECLARE
and DEALLOCATE
could be supported, but are currently a low priority feature.
I'm not familiar with this SQL dialect, but I'm sure you are doing something wrong to be using it with EdgeDB.