roll back id adds

This commit is contained in:
Brian Cao 2022-10-10 17:01:48 -07:00
parent ec6454aead
commit 4073d57e64
10 changed files with 14 additions and 22 deletions

View file

@ -37,7 +37,6 @@ async function relationalQuery(
async function clickhouseQuery(
websiteId,
website_uuid,
start_at,
end_at,
timezone = 'UTC',

View file

@ -39,7 +39,7 @@ function clickhouseQuery(websites, start_at) {
where event_name != ''
and ${
websites && websites.length > 0
? `website_id in (${getCommaSeparatedStringFormat(websites, websites.website_uuid)})`
? `website_id in (${getCommaSeparatedStringFormat(websites)})`
: '0 = 0'
}
and created_at >= ${getDateFormat(start_at)}`,

View file

@ -34,15 +34,13 @@ async function relationalQuery(websiteId, { sessionId, url, eventName, eventData
async function clickhouseQuery(
websiteId,
{ session: { country, sessionUuid, ...sessionArgs }, eventUuid, url, eventName, eventData },
website_uuid,
) {
const { getDateFormat, sendMessage } = kafka;
const params = {
session_uuid: sessionUuid,
event_uuid: eventUuid,
session_id: sessionUuid,
event_id: eventUuid,
website_id: websiteId,
website_uuid,
created_at: getDateFormat(new Date()),
url: url?.substring(0, URL_LENGTH),
event_name: eventName?.substring(0, EVENT_NAME_LENGTH),

View file

@ -37,7 +37,7 @@ async function clickhouseQuery(websites, start_at) {
where event_name = ''
and ${
websites && websites.length > 0
? `website_id in (${getCommaSeparatedStringFormat(websites, websites.website_uuid)})`
? `website_id in (${getCommaSeparatedStringFormat(websites)})`
: '0 = 0'
}
and created_at >= ${clickhouse.getDateFormat(start_at)}`,