November 30, 2021, 10:24am
Hi, I know we can track the user view count of dashboards by writing SQL, now I wonder is there any way we can track the user view count of questions. We need to know which question is popular rather than the dashboard.
Hope someone could introduce a method , thanks.
November 30, 2021, 10:29am
That is builtin to the Audit functionality in the Pro/Enterprise edition.
But otherwise you'll need to look in the query_execution table - see more examples here: Metabase Metadata SQL
November 30, 2021, 10:36am
thanks for your quick reply.
Now I am using free open source, I checked the
Metabase Metadata SQL , but did not find the query could fit the requirement, could you kindly share with me the query?
Thanks a lot!
November 30, 2021, 10:46am
@kim Did you look in the comments? Which query are you using to see the dashboard activity?
November 30, 2021, 10:49am
yes, I use /* which dashboards has a user viewed */ this query to see the dashboard activity, and I also want to see the question activity, but I could not find suitable query.
November 30, 2021, 10:56am
@kim Did you try this?
Most viewed questions in the last 3 months
/* Most viewed questions in the last 3 months */
rc.name AS CardName
, COUNT(vl.user_id) AS viewCount
, rc.description AS CardDescription
FROM view_log vl
INNER JOIN report_card rc ON rc.id = vl.model_id
-- last 3 months
AND str_to_date(concat(date_format(vl.timestamp, '%Y-%m'), '-01'), '%Y-%m-%d')
BETWEEN str_to_date(concat(date_format(date_add(now(6), INTERVAL -3 month), '%Y-%m'), '-01'), '%Y-%m-%d')
November 30, 2021, 11:35am
Thanks, flamber, this is exactly what I am looking for!
November 17, 2022, 4:54pm
Is there a way to access Metabase Metadata why on Cloud but not pro/Enterprise edition ?
November 17, 2022, 5:03pm