Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO_SQL_DATA error returned on CREATE TABLE and others #236

Closed
kskoeld opened this issue May 25, 2019 · 3 comments
Closed

NO_SQL_DATA error returned on CREATE TABLE and others #236

kskoeld opened this issue May 25, 2019 · 3 comments

Comments

@kskoeld
Copy link

kskoeld commented May 25, 2019

I keep getting errors using AWS Athena ODBS driver ( and earlier Redshift) whenever I send Queries with CREATE TABLE CREATE VIEW DROP TABLE and the like.
Naturally such queries do not return data, so the error message doesn't really make sense here.
Any known workaround for this?
I tried handling these situation with

        try
            df=ODBC.query(dsn,strSQL)
        catch err
            if occursin(err.msg,"SQL_NO_DATA")
                println("done")
            else
                println(err)
                println(strSQL)
                return err
            end

        end

but that doesn't work.

@pnorth1
Copy link

pnorth1 commented Aug 29, 2019

For these transaction statements it should work to use ODBC.execute! instead of ODBC.query

@quinnj
Copy link
Member

quinnj commented Aug 29, 2019

This changed in a recent release; before we were swallowing errors when fetching data, but obviously NO_SQL_DATA is a valid return code here. I'll work on a fix.

@quinnj
Copy link
Member

quinnj commented May 23, 2020

Should be fixed with #263

@quinnj quinnj closed this as completed May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants