Fine-grained access control for models Stay organized with collections Save and categorize content based on your preferences.
This page explains howfine-grained access control works with Spannermodels.
For fine-grained access control users, you can control access to MODEL entitieswith the following privilege:
Grant
EXECUTEon the model to allowmachine learning functions to use it.GoogleSQL
GRANT EXECUTE ON MODELMODEL_NAME TO ROLEROLE_NAME;
INFORMATION_SCHEMA views for models
The following views show the database roles and privileges information for models:
- GoogleSQL-dialect databases:
INFORMATION_SCHEMA.MODEL_PRIVILEGES
The rows in this view are filtered based on the current database role'sprivileges on models. This ensures that principals can view only theroles, privileges, and models that they have access to.
Row filtering also applies to the following model-related views:
GoogleSQL
The system rolespanner_info_reader and its members always see an unfilteredINFORMATION_SCHEMA.
More information
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.