Skip to content

ObjectNameRequest

relationalai.config
ObjectNameRequest(name: str, object_type: DeployObjectKind, scope: Scope)

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: str

The object’s logical name, unqualified and unquoted, as PyRel writes it: for example "Customer" or "_INTERNAL_STORE_Customer".

.object_type

ObjectNameRequest.object_type: DeployObjectKind

The 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: str

"public" for an object in the public schema (the model’s views), "internal" for every other object.