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

ClickhouseAnalytics: Table *.vendure_search_event doesn't exist #21

Open
Draykee opened this issue Jun 8, 2023 · 2 comments
Open

ClickhouseAnalytics: Table *.vendure_search_event doesn't exist #21

Draykee opened this issue Jun 8, 2023 · 2 comments

Comments

@Draykee
Copy link

Draykee commented Jun 8, 2023

I received multiple errors related to the Clickhouse Analytics strategy:

{"timestamp":"2023/06/08 07:38:39 +00:00","level":"error","context":"AdvancedSearchPlugin","message":"Clickhouse error: Code: 60. DB::Exception: Table fainin_search_analytics.vendure_search_event doesn't exist. (UNKNOWN_TABLE) (version 23.3.1.2823 (official build))\n\nquery: \n              SELECT toDate('2023-05-09 07:38:38') + number as date,\n                data.totalQueryCount,\ndata.targetCount,\ndata.rate\n                 FROM numbers(dateDiff('day', toDate('2023-05-09 07:38:38'), toDate('2023-06-08 07:38:38')) + 1) dates\n                  LEFT JOIN (SELECT\n                         row.queryDate date,\n                         count(DISTINCT row.queryId) totalQueryCount,\n                         countIf(event.eventType = 'SEARCH_RESULT_CLICKED') targetCount,\n                         countIf(event.eventType = 'SEARCH_RESULT_CLICKED') / count(DISTINCT row.queryId) rate\n                     FROM vendure_search_query row\n                     LEFT JOIN vendure_search_event event ON row.queryId = event.queryId\n                     GROUP BY row.queryDate) data ON data.date = date\n               FORMAT JSON"}


{"timestamp":"2023/06/08 08:10:55 +00:00","level":"error","context":"AdvancedSearchPlugin","message":"Clickhouse error: Code: 60. DB::Exception: Table fainin_search_analytics.vendure_search_event doesn't exist. (UNKNOWN_TABLE) (version 23.3.1.2823 (official build))\n\nquery: \n            INSERT INTO vendure_search_event (collectionName, queryId, eventType) VALUES ('vendure_products', 'qwujOWidW-p8hdET', 'SEARCH_LIST_VIEWED');\n         FORMAT JSON"}

{"timestamp":"2023/06/08 08:14:20 +00:00","level":"error","context":"AdvancedSearchPlugin","message":"Clickhouse error: Code: 60. DB::Exception: Table fainin_search_analytics.vendure_search_event doesn't exist. (UNKNOWN_TABLE) (version 23.3.1.2823 (official build))\n\nquery: \n            INSERT INTO vendure_search_event (collectionName, queryId, eventType, position, resultId) VALUES ('vendure_products', '-w1GNmFQX9tBVuKg', 'SEARCH_RESULT_CLICKED', 6, '0b738314-960a-4298-ac0b-9db59bd49777');\n         FORMAT JSON"}

When I connect to the database, everything appears to be normal. Except, that position and resultID is always null.
image
image

Furthermore, this error is not appearing all the time! And even though a logSearchResultClicked was successfully executed, I can't see any change in the database.
image
image

@Draykee
Copy link
Author

Draykee commented Jun 8, 2023

Btw @michaelbromley is resultId the id of the clicked product?

@Draykee Draykee changed the title ClickhouseAnalytics: ClickhouseAnalytics: Table *.vendure_search_event doesn't exist Jun 9, 2023
@michaelbromley
Copy link
Member

Thanks for the report, I'm doing a lot of work on this plugin right now to fully update it to v2, so I will check in to this.

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

2 participants