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

Added quotes to the dataframe at push mess up DateTime columns #30

Open
DrissiReda opened this issue Jun 16, 2020 · 3 comments
Open

Added quotes to the dataframe at push mess up DateTime columns #30

DrissiReda opened this issue Jun 16, 2020 · 3 comments

Comments

@DrissiReda
Copy link

I'm reading data from a clickhouse db and writing to another one.

my script is basically this:

df=ph.read_clickhouse("SELECT * FROM test.testing", index=True, connection=dict(host=url1))
ph.to_clickhouse(df, table='testing', index=False,  chunksize=5000, connection=dict(database='test', host=url2))

The dataframe seems clean
This is the output I'm getting

Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected " before: 6-02","Donnees","Tous Sexes","Tous Ages",83,17,"","0000-00-00 00:00:00","0000-00-00 00:00:00"
"51 Marne","2020-04-09","2020-06-02","Donnees","Tous Sexes","Tous : (at row 1)

Row 1:
Column 0,   name: dep,              type: String,   parsed text: "<DOUBLE QUOTE>51 Marne<DOUBLE QUOTE>"
Column 1,   name: timestamp_data,   type: DateTime, ERROR: text "<DOUBLE QUOTE>2020-04-0" is not like DateTime

 (version 20.3.8.53 (official build))
@kszucs
Copy link
Owner

kszucs commented Jul 8, 2020

Thanks for the report, I'm trying to find some time to fix the recent issues.

@ndy-cd
Copy link

ndy-cd commented Jul 24, 2020

I got the same problem with inserting DateTime column to clickhouse

@danni2019
Copy link

Hi, is this issue beed fixed yet? Because I am using pandahouse V0.2.7 and still getting the following error:

pandahouse.http.ClickhouseException: b'Code: 27, e.displayText() = DB::ParsingException: Cannot parse input: expected \'"\' before: \'5-19","2021-05-24", type: DateTime, parsed text: "<DOUBLE QUOTE>2020-05-20<DOUBLE QUOTE>,<DOUBLE QUOTE>2021-0"ERROR: DateTime must be in YYYY-MM-DD hh:mm:ss or NNNNNNNNNN (unix timestamp, exactly 10 digits) format.\nCode: 27, e.displayText() = DB::ParsingException: Cannot parse input: expected \'"\' before: \'5-

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

4 participants