CREATE VIEW user_group_view WITH (security_invoker = TRUE) AS
SELECT COUNT(user_id) AS members_count
FROM `/Root/user_group_members`; -- write your own path to the `user_group_members` table
Select from the view:
SELECT * FROM user_group_view;
Observe an error:
Status: GENERIC_ERROR
Issues:
<main>: Error: Type annotation, code: 1030
<main>:1:1: Error: At function: RemovePrefixMembers, At function: RemoveSystemMembers, At function: PersistableRepr, At function: SqlProject, At function: PersistableRepr, At function: SqlProject
<main>:1:48: Error: At function: AssumeColumnOrderPartial
<main>:1:8: Error: At function: Aggregate, At function: Apply
<main>:1:8: Error: Expected callable type, but got: Unit
To reproduce:
Create the necessary table to read from:
Create a view:
Select from the view:
Observe an error: