-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Expected unicode, got quoted_name #810
Comments
That's a lot of code and stuff I'm not familiar with, it would be really useful to try to pare down the reproducer to the minimum required to show the problem. At a complete guess |
restricted to code as much as I could to repeat the problem.
Regards,
Trent Glover
AmerisourceBergen
MWI Animal Health
Data Engineer
Work Phone: 208.955.9527
Cell/text: 208.283.3572
3041 W Pasadena Dr.
Boise, ID 83705
United States
www.mwiah.com
United in our responsibility
to create healthier futures
Confidentiality notice: This electronic mail transmission may contain privileged, confidential and/or protected personal information and is intended only for the review of the party to whom it is addressed. Any unauthorized use or disclosure of the information contained herein may be a violation of applicable law. If you have received this transmission in error, please immediately return it to the sender, delete it and destroy it without reading it. Unintended transmission shall not constitute the waiver of the attorney-client or any other privilege.
From: Martin Durant ***@***.***>
Sent: Thursday, September 29, 2022 7:33 AM
To: dask/fastparquet ***@***.***>
Cc: Glover, Trent ***@***.***>; Author ***@***.***>
Subject: Re: [dask/fastparquet] Expected unicode, got quoted_name (Issue #810)
CAUTION: This email originated from outside of the organization. DO NOT CLICK links or open attachments unless you recognize the sender and know the content is safe.
That's a lot of code and stuff I'm not familiar with, it would be really useful to try to pare down the reproducer to the minimum required to show the problem.
At a complete guess columns=column_dict in pd.DataFrame() is passing some non-string items derived from the database stuff. You may need explicit str() around these.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/dask/fastparquet/issues/810*issuecomment-1262291035__;Iw!!I5RyydYb1W3tjTUU!19pPU5SOOMfH4SNWFo6-INpKzV65Tjubm_vb358BXIVq2zEiKA-RGp4FzEyupBGnHOiyD6uR6FxH3sY_AP0aeXBaRfVi3iRacnrM$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AV3FIZCDRMRRPSNGE6X4BSLWAWLBHANCNFSM6AAAAAAQYHCYAA__;!!I5RyydYb1W3tjTUU!19pPU5SOOMfH4SNWFo6-INpKzV65Tjubm_vb358BXIVq2zEiKA-RGp4FzEyupBGnHOiyD6uR6FxH3sY_AP0aeXBaRfVi3qxIUgmb$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
same error when attempting to turn all columns into strings... data_query: str = "Select {} from archive.Ibs.PHOALD WITH (NOLOCK) Where Convert(date, Transaction_time) > Convert(" ...
|
A "quoted_name" is entering into your dataframe metadata somewhere, so the task is to find out where. Maybe fastparquet should be converting it to a string internally, but I would bet that requiring a real string is a reasonable expectation in this case. I'm afraid I don't really know what your code it doing, I don't normally work with DB cursor objects. You might find it easier to use pd.from_sql_query instead, as I suspect it might do the correct conversions for you. |
the problem definitely looks like it is native to the fastparquet code. i've called it without modification and it is still throwing the error. |
What did you call exactly? Did you manage to make a dataframe showing this problem without SQL? |
The construction and the population of the dataframes are within the __write_parquet function which is called from the table_to_parquet function within the fastparquet code. I have not attempted to build a dataframe outside of this code.
I’m new to all of this so I apologize if I don’t get exactly how this works, but I’m assuming that unless I have something useful to add, I really shouldn’t be messing with the code that is part of the offering.
Regards,
Trent Glover
AmerisourceBergen
MWI Animal Health
Data Engineer
Work Phone: 208.955.9527
Cell/text: 208.283.3572
3041 W Pasadena Dr.
Boise, ID 83705
United States
www.mwiah.com
United in our responsibility
to create healthier futures
Confidentiality notice: This electronic mail transmission may contain privileged, confidential and/or protected personal information and is intended only for the review of the party to whom it is addressed. Any unauthorized use or disclosure of the information contained herein may be a violation of applicable law. If you have received this transmission in error, please immediately return it to the sender, delete it and destroy it without reading it. Unintended transmission shall not constitute the waiver of the attorney-client or any other privilege.
From: Martin Durant ***@***.***>
Sent: Monday, October 3, 2022 9:26 AM
To: dask/fastparquet ***@***.***>
Cc: Glover, Trent ***@***.***>; Author ***@***.***>
Subject: Re: [dask/fastparquet] Expected unicode, got quoted_name (Issue #810)
CAUTION: This email originated from outside of the organization. DO NOT CLICK links or open attachments unless you recognize the sender and know the content is safe.
i've called it without modification and it is still throwing the error.
What did you call exactly? Did you manage to make a dataframe showing this problem without SQL?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/dask/fastparquet/issues/810*issuecomment-1265638515__;Iw!!I5RyydYb1W3tjTUU!yDykGC6DR4jSE4osXPBo8SqykzsuoID8OJWsRP-aoSkRphGqbOUaNcfCc-SANS-7zaZSp880UiKnVS3g2PKgo4jg1601nvHnAMbZ$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AV3FIZD2VOEUR62LJZUZNHDWBL3GZANCNFSM6AAAAAAQYHCYAA__;!!I5RyydYb1W3tjTUU!yDykGC6DR4jSE4osXPBo8SqykzsuoID8OJWsRP-aoSkRphGqbOUaNcfCc-SANS-7zaZSp880UiKnVS3g2PKgo4jg1601nizsvokU$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I mean:
here both the original
Are the dtypes really all str? |
Error returned when calling parquetobj.table_to_parquet(parq_file_name, row['schema_name'], row['table_name'] , sql, db_engine, batch_size)
error is
Code:
from tempfile import NamedTemporaryFile
import pyodbc, fastparquet
from datetime import date
import pandas as pd
from sqlalchemy import Table, create_engine, schema
if name == 'main':
The text was updated successfully, but these errors were encountered: