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

Troubles with primary key on import MergeTree table #18

Open
demenkov opened this issue Oct 25, 2018 · 0 comments
Open

Troubles with primary key on import MergeTree table #18

demenkov opened this issue Oct 25, 2018 · 0 comments

Comments

@demenkov
Copy link

ORDER BY — Primary key.

A tuple of columns or arbitrary expressions. Example: ORDER BY (CounterID, EventDate). If a sampling expression is used, the primary key must contain it. Example: ORDER BY (CounerID, EventDate, intHash32(UserID)).

CREATE TABLE client_work_interval
(
uuid String,
timestamp DateTime,
date Date,
manager_id UInt32,
user_id UInt32,
status Int8
)
ENGINE=MergeTree() PARTITION BY toYYYYMM(date) ORDER BY (date, intHash32(user_id), intHash32(manager_id)) SAMPLE BY intHash32(user_id) SETTINGS index_granularity=8192

php bin/console doctrine:mapping:import 'App\Entity' annotation --path=src/Entity --em=clickhouse

In DatabaseDriver.php line 288:
                                                                                                 
  Table client_work_interval has no primary key. Doctrine does not support reverse engineering   
  from tables that don't have a primary key.                                                     
                                                                               
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

1 participant