snowflake.core.FQNΒΆ
- class snowflake.core.FQN(database: str | None, schema: str | None, name: str, signature: str | None = None)ΒΆ
Bases:
object
Represents an object identifier, supporting fully qualified names.
The instance supports builder pattern that allows updating the identifier with database and schema from different sources.
Examples
>>> fqn = FQN.from_string("my_schema.object").using_connection(conn)
>>> fqn = FQN.from_string("my_name").set_database("db").set_schema("foo")
Attributes
- databaseΒΆ
- identifierΒΆ
- nameΒΆ
- prefixΒΆ
Methods
- classmethod from_string(identifier: str) FQN ΒΆ
Take in an object name in the form [[database.]schema.]name and return a new
FQN
instance.- Raises:
InvalidIdentifierError β If the object identifier does not meet identifier requirements.
- to_dict() dict[str, str | None] ΒΆ
Return the dictionary representation of the instance.