lalinsky / python-phoenixdb

Phoenix database adapter for Python (migrated to the Apache Phoenix repo)
https://issues.apache.org/jira/browse/PHOENIX-4636
Apache License 2.0
26 stars 24 forks source link

No records written, no error thrown #15

Closed archenroot closed 5 years ago

archenroot commented 5 years ago

I am having strange issue. I have table primary key VARCHAR and some data TIMESTAMPS:

CREATE TABLE IF NOT EXISTS public.OBJECT_TRACKER (
                object_path      VARCHAR,
                ready_to_process TIMESTAMP, 
                processed        TIMESTAMP, 
                error            TIMESTAMP, 
                error_message    VARCHAR, 
                s3_last_modified TIMESTAMP 
                CONSTRAINT object_tracker_pk PRIMARY KEY(object_path)
                )

When using Phoenix client (sqlline.py), all works as expected, but using phoenixdb I have strange behaviors:

  1. When calling "UPSERT INTO public.object_tracker(object_path) VALUES (?)" and pass some string, in database there only appears key with first character from long string. "evolution" will store "e" in HBase. No error is thrown

  2. Its even more tricky. When I try to insert VARCHAR (PK) and TIMESTAMP type via statement = "UPSERT INTO public.object_tracker(object_path,ready_to_process) VALUES (?,?)" and do: cursor.execute(statement, (obj.object_full_path, datetime.now())) it didn't wrote anything into database....

And now for the end I did in phoenix cli "Delete from table" and tried via phoenixdb same upserts and now it works :-), not sure if scenario is reproducible and if it is issue in phoenix or elsewhere in hadoop infra.

archenroot commented 5 years ago

It was probably some issue on infra or I don't know, closing... it work fine now.