Skip to content

trulens.connectors.snowflake.snowflake_event_table_db

trulens.connectors.snowflake.snowflake_event_table_db

Classes

SnowflakeEventTableDB

Bases: DB

Connector to the account level event table in Snowflake.

Attributes
redact_keys class-attribute instance-attribute

Redact secrets before writing out data.

Functions
get_records_and_feedback
get_records_and_feedback(
    app_ids: Optional[List[AppID]] = None,
    app_name: Optional[AppName] = None,
    app_version: Optional[AppVersion] = None,
    app_versions: Optional[List[AppVersion]] = None,
    run_name: Optional[RunName] = None,
    record_ids: Optional[List[RecordID]] = None,
    offset: Optional[int] = None,
    limit: Optional[int] = None,
) -> Tuple[DataFrame, Sequence[str]]
get_events
get_events(
    app_name: Optional[AppName] = None,
    app_version: Optional[AppVersion] = None,
    run_name: Optional[RunName] = None,
    record_ids: Optional[List[RecordID]] = None,
    start_time: Optional[datetime] = None,
) -> DataFrame

Get events from the database.

PARAMETER DESCRIPTION
app_name

The app name to filter events by.

TYPE: Optional[AppName] DEFAULT: None

app_version

The app version to filter events by.

TYPE: Optional[AppVersion] DEFAULT: None

run_name

The run name to filter events by.

TYPE: Optional[RunName] DEFAULT: None

record_ids

The record ids to filter events by.

TYPE: Optional[List[RecordID]] DEFAULT: None

start_time

The minimum time to consider events from.

TYPE: Optional[datetime] DEFAULT: None

RETURNS DESCRIPTION
DataFrame

A pandas DataFrame of all relevant events.

get_apps
get_apps(
    app_name: Optional[AppName] = None,
) -> Iterable[JSONized[AppDefinition]]
get_feedback_defs
get_feedback_defs(
    feedback_definition_id: Optional[
        FeedbackDefinitionID
    ] = None,
) -> DataFrame
__rich_repr__
__rich_repr__() -> Result

Requirement for pretty printing using the rich package.

update_app_metadata
update_app_metadata(
    app_id: AppID, metadata: Dict[str, Any]
) -> Optional[AppDefinition]

Update the metadata of an app.

extract_app_and_run_info staticmethod
extract_app_and_run_info(
    attributes: Dict[str, Any],
    resource_attributes: Dict[str, Any],
) -> Tuple[str, str, str, str]

Get app info from attributes.

PARAMETER DESCRIPTION
attributes

Span attributes of record root.

TYPE: Dict[str, Any]

resource_attributes

Resource attributes of record root.

TYPE: Dict[str, Any]

RETURNS DESCRIPTION
Tuple[str, str, str, str]

Tuple of: app name, app version, app id, and run name.