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

Unable to upload csv to database #28146

Open
2 of 3 tasks
ShubhamSharmaCSE opened this issue Apr 19, 2024 · 1 comment
Open
2 of 3 tasks

Unable to upload csv to database #28146

ShubhamSharmaCSE opened this issue Apr 19, 2024 · 1 comment

Comments

@ShubhamSharmaCSE
Copy link

Bug description

Getting the below error when doing a csv upload:

Unable to upload CSV file "sankey_sample_working.csv" to table "SankeySampleTest" in database "cube". Error message: (psycopg2.errors.FeatureNotSupported) Unsupported query type: CREATE TABLE public."SankeySampleTestSharma" (source TEXT, target TEXT, total_count BIGINT) QUERY: CREATE TABLE public."SankeySampleTestSharma" (source TEXT, target TEXT, total_count BIGINT) [SQL: CREATE TABLE public."SankeySampleTestSharma" ( source TEXT, target TEXT, total_count BIGINT ) ] (Background on this error at: https://sqlalche.me/e/14/tw8g)

Enabled the csv upload from the database connection table. Added CSV_EXTENSIONS = {'csv'}, ENABLE_CSV_EXPORT = True to the superset_config.py.

Is the issue with postgres driver that it does not have the feature to do create table?

Or is there any restriction on the create operations on the database? Seems like it should have the permission to do that operation.

How to reproduce the bug

Go to database connection. Select postgres, add connection settings for database, under security tab, enable allow csv file to upload. Post that go to upload csv to database under data section, upload a csv to the database. It will result in mentioned error.

Screenshots/recordings

image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dpgaspar
Copy link
Member

Hi,

What database engine are you using? Also can you share your connection string

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

2 participants