ObjectNameRequest
ObjectNameRequest( name: str, object_type: DeployObjectKind, scope: Scope, placement: Placement | None = None,)What a naming function (deployment.object_naming) gets for one object.
A deploy calls the function once for each object it creates. The function returns the object’s name in Snowflake.
Import it from relationalai.config:
>>> from relationalai.config import ObjectNameRequest >>> def name_object(request: ObjectNameRequest) -> str: … suffix = “V” if request.object_type == “VIEW” else "" … return “S6” + request.name + suffix
Attributes
.name
ObjectNameRequest.name: strThe object’s logical name, unqualified and unquoted, as PyRel writes it:
for example "Customer" or "_INTERNAL_STORE_Customer".
.object_type
ObjectNameRequest.object_type: DeployObjectKindThe object’s kind in Snowflake’s spelling: "TABLE", "VIEW",
"DYNAMIC TABLE", "ICEBERG TABLE", "SEMANTIC VIEW",
"PROCEDURE", "FUNCTION" or "TASK". It compares equal to these
strings.
.scope
ObjectNameRequest.scope: strThe object’s role. "public" for the model’s public views, which PyRel
queries read, "internal" for every other object.
.placement
ObjectNameRequest.placement: strThe schema the object is deployed in: "public_schema" or
"internal_schema". Public views are in the public schema unless
deployment.placement puts them in the internal one; every other
object is in the internal schema. Naming conventions that belong to a
schema should read placement, not scope: a public view placed in
the internal schema has scope "public" and placement
"internal_schema". A request built without it gets the schema its
scope defaults to.