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

[CT-1543] [Bug] dbt seed raise error mismatched input 's' when there is 's in csv file #6306

Closed
2 tasks done
grhaonan opened this issue Nov 22, 2022 · 5 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@grhaonan
Copy link

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

dbt seed will raise the following error when there is a 's expression in csv

botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: line 2:2611: mismatched input 's'. Expecting: ')', ','
Failed to execute query.

Expected Behavior

it should work

Steps To Reproduce

csv with format

2500, dustin's test

The issue will gone if it is

2500, dustins test, the issue is ' character before the letter s

Relevant log output

No response

Environment

- OS: Macos 12.6
- Python: 3.9
- dbt: 1.0.8
- athena plugin athena: 1.0.1

Which database adapter are you using with dbt?

No response

Additional Context

I am not sure if this issue is related to athena adapter or dbt core

if ' character is not supported in the csv form seed would expect, may I suggest to update the documentation to mention this limitation as I spent 1 hour to figure out this.

if ' character is supposed to be supported( my understanding), then this is an issue either related to core or athena adapterfiguring

@grhaonan grhaonan added bug Something isn't working triage labels Nov 22, 2022
@github-actions github-actions bot changed the title [Bug] dbt seed raise error mismatched input 's' when there is 's in csv file [CT-1543] [Bug] dbt seed raise error mismatched input 's' when there is 's in csv file Nov 22, 2022
@dbeatty10
Copy link
Contributor

Thanks for reaching out @grhaonan !

Did you include column headers in the first line of CSV (like my_number,my_string as shown below)?

If so, then I suspect this is an issue in Athena adapter you are using, as all of the following work for me when testing with dbt-snowflake:

my_number,my_string
2500,dustin's test

Or:

my_number,my_string
2500,"dustin's test"

Or:

my_number,my_string
"2500","dustin's test"

@grhaonan
Copy link
Author

Hi Doug,

Thanks for your quick check and test.

Yes, it did have the headers and I am able to reproduce the issue with your sample as well

Screen Shot 2022-11-24 at 9 32 03 am

Screen Shot 2022-11-24 at 9 32 11 am

The issue is gone after removing the ' before s

Okay, I will route this issue to athena-adapter community then, thanks for your help.

@dbeatty10
Copy link
Contributor

Closing in favor of dbt-athena/dbt-athena#60

@dbeatty10 dbeatty10 removed the triage label Nov 28, 2022
@owenprough-sift
Copy link

Closing in favor of dbt-athena/dbt-athena#60

@dbeatty10 you may have forgotten to close this issue. :)

@dbeatty10
Copy link
Contributor

😅 Thank you @owenprough-sift

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants