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_keys: bool = DEFAULT_DATABASE_REDACT_KEYS
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,
record_ids: Optional[List[RecordID]] = None,
offset: Optional[int] = None,
limit: Optional[int] = None,
) -> Tuple[DataFrame, Sequence[str]]
Get records from the database.
PARAMETER | DESCRIPTION |
---|---|
app_ids
|
If given, retrieve only the records for the given apps. Otherwise all apps are retrieved. |
app_name
|
If given, retrieve only the records for the given app name. |
app_version
|
If given, retrieve only the records for the given app version.
TYPE:
|
app_versions
|
If given, retrieve only the records for the given app versions.
TYPE:
|
record_ids
|
Optional list of record IDs to filter by. Defaults to None. |
offset
|
Database row offset. |
limit
|
Limit on rows (records) returned. |
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
A DataFrame with the records. |
Sequence[str]
|
A list of column names that contain feedback results. |
get_events
¶
get_events(
app_name: Optional[AppName] = None,
app_version: Optional[AppVersion] = 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. |
app_version
|
The app version to filter events by.
TYPE:
|
record_ids
|
The record ids to filter events by. |
start_time
|
The minimum time to consider events from. |
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
A pandas DataFrame of all relevant events. |
get_apps
¶
get_apps(
app_name: Optional[AppName] = None,
) -> Iterable[JSONized[AppDefinition]]
See DB.get_apps.
update_app_metadata
¶
Update the metadata of an app.