snowflake.core.FQN | Snowflake Documentation (original) (raw)
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.
set_database(database: str | None) → FQN¶
set_schema(schema: str | None) → FQN¶
to_dict() → dict[str, str | None]¶
Return the dictionary representation of the instance.
using_connection(conn: SnowflakeConnection) → FQN¶
Update the instance with database and schema from connection.