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
Wrong error message when using insert_data_bulk #161
Comments
Hi @diegoxfx , Thank you for reporting this issue. I will take a look into this behavior and update with my findings. |
Hi @diegoxfx , I've implemented a fix for this issue. The check performed on LOC363 of |
Hi @diegoxfx , this was just fixed in 2.0.912. please open a new issue if you continue to experience this issue. |
Hi @Brooke-white i'm facing this error again, but this time with every column name:
Current version: 2.0.918 |
Hi @diegoxfx , thank you for letting me know and including the repro. I see you're using a temporary table. By any chance does this reproduce for a non-temporary table? Also, could you let me know which redshift server version you are using? |
@Brooke-white I don't have permissions to create non-temporary tables, so i can't check that. Redshift server version is: |
@diegoxfx I see you're on Redshift server "Patch 179". Our latest server version is "Patch 180". I'd recommend upgrading to the latest server version, Patch 180 as of writing, or awaiting the cluster maintenance window. Please let me know if the issue still presents after the upgrade. https://docs.aws.amazon.com/redshift/latest/mgmt/cluster-versions.html#cluster-version-180 |
@Brooke-white Once the server is updated to Patch 180 I'll let you know. For the moment, downgrading redshift-connector worked for me |
Glad to hear it's working again for you @diegoxfx. Could you confirm the version of redshift-connector where you saw issue (I believe 2.0.910) and the version where you saw resolution? I'd like to double check there is no issue in our driver. |
@Brooke-white I think the problem is due to this validation: amazon-redshift-python-driver/redshift_connector/cursor.py Lines 311 to 312 in e457b2e
This line is checking if the pair table/column exists and returns error when that pair doesn't exist. So, why is this problem happening in the last version and not before? For what i see, this line was change on this commit: b199bfa#diff-7a712c2f5672b7e37cafedba351f2cbdd8a07f9478317a8ab7ffd1c60f9dcee6L356 The original line was: So i made some experiments on redshift and got this:
I basically created a temporary table using redshift editor, and searched for the table info using both For However, for Maybe the problem could be resolved by creating a parameter that indicates whether the table is temporary or not, and based on that use |
I found another bug, but i think it should be in other issue. To be brief: If you have null values in the csv (for example, |
Driver version
2.0.910
Redshift version
I don't know
Client Operating System
Amazon Linux 2
Python version
3.10.8
Table schema
Problem description
I write the columns name of the table i want to insert into a temporary table. Let's say one of the columns is not written well.
What i expect is to get this error message: "
Invalid column name: ...
"What i get is: "
TypeError: 'NoneType' object is not subscriptable
"Reproduction code
Apparently, the error is in these lines, because "res" is getting None type when error.
amazon-redshift-python-driver/redshift_connector/cursor.py
Lines 360 to 364 in 910be71
The text was updated successfully, but these errors were encountered: