Report: Hello world Query

Example Usage

SELECT * FROM community.report(NULL::community_types."@wisdom/developing/passing-parameters",
_project_id => ?
);

Report Context

Context

Here we've got a simple example of passing parameters into community reports. All parameters passed are accessible as a JSONB object at $1. Accessing a value by key value generally requires casting to a known data type.

($1->>'_project_id')::INTEGER

Report Definitions

Input Parameters

Name
projectid

Output Record Type

NameType
projectIdinteger
sessionStarttimestamptz
identityIdvarchar80
timezoneIANAvarchar255
countryCodevarchar4
browserNamevarchar32
activeTimeinteger

SQL Report Query

SELECT
"projectId",
"sessionStart",
"identityId",
"timezoneIANA",
"countryCode",
"browserName",
"activeTime"
FROM ATOMIC.SESSION
WHERE
"projectId" = ($1->>'_project_id')::INTEGER
ORDER BY
"sessionStart" DESC
LIMIT 10;
Last updated on by John Gracey