mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-08 17:50:28 +00:00

* Initial implementation of report endpoint * Modified model files * Added migration * Added tests for analytics/report endpoint * Finalized implementation of the reports endpoint * Fixed maven test failure * Fixed java style * Added policy for reportDefinition * Fixed minor typos in code * Added database migration for web analytic event type * Added logic for collect endpoint * Added JSON Schema for collect endpoint * Added index on table columns + added resource description for web event entities * Fixed policy tests * Updated add web analytic function to return the body of the request + updated test * Added referer URL to PageView event * Changed collection name to align with API endpoint * updated initSeed method to initializeEntity * cleaned up PR by removing unused filed from branch * Fixed requested changes from review * Clean up names * Fixed comma in SQL statement
14 lines
761 B
SQL
14 lines
761 B
SQL
CREATE TABLE IF NOT EXISTS web_analytic_event (
|
|
id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL,
|
|
name VARCHAR(256) GENERATED ALWAYS AS (json ->> 'name') STORED NOT NULL,
|
|
fullyQualifiedName VARCHAR(256) GENERATED ALWAYS AS (json ->> 'fullyQualifiedName') STORED NOT NULL,
|
|
eventType VARCHAR(256) GENERATED ALWAYS AS (json ->> 'eventType') STORED NOT NULL,
|
|
json JSONB NOT NULL,
|
|
updatedAt BIGINT GENERATED ALWAYS AS ((json ->> 'updatedAt')::bigint) STORED NOT NULL,
|
|
updatedBy VARCHAR(256) GENERATED ALWAYS AS (json ->> 'updatedBy') STORED NOT NULL,
|
|
deleted BOOLEAN GENERATED ALWAYS AS ((json ->> 'deleted')::boolean) STORED,
|
|
UNIQUE (name)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS name_index ON web_analytic_event(name);
|