Skip to content

Commit

Permalink
Add schema if specified (#2141)
Browse files Browse the repository at this point in the history
Add schema if specified in auto metrics SQL
  • Loading branch information
lukesonnet committed Feb 21, 2024
1 parent d16dbbf commit c906650
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/back-end/src/integrations/SqlIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2806,7 +2806,12 @@ AND event_name = '${eventName}'`,
COUNT (*) as count,
MAX(${timestampColumn}) as lastTrackedAt
FROM
${this.generateTablePath(trackedEventTableName, schema)}
${this.generateTablePath(
trackedEventTableName,
schema,
undefined,
!!schema
)}
WHERE ${getDateLimitClause(start, end)}
AND ${eventColumn} NOT IN ('experiment_viewed', 'experiment_started')
GROUP BY ${groupByColumn || eventColumn}
Expand Down

0 comments on commit c906650

Please sign in to comment.