marivo.datasource.trino#

marivo.datasource.trino(name, *, host, catalog, port=None, schema=None, source=None, timezone=None, http_scheme=None, client_tags=None, session_properties=None, user_env=None, auth_env=None, description=None, ai_context=None, extra=None)[source]#

Declare a Trino datasource.

Parameters:
  • name (str) – Global datasource name; letters, digits, underscores, and hyphens only.

  • host (str) – Trino coordinator host.

  • catalog (str) – Trino catalog; mapped to ibis database at connect time.

  • port (int | None) – Trino port; ibis default is 8080.

  • schema (str | None) – Optional default schema.

  • source (str | None) – Optional client application/source tag.

  • timezone (str | None) – Optional engine session timezone.

  • http_scheme (str | None) – Set to ‘https’ for TLS.

  • client_tags (tuple[str, ...] | None) – Optional Trino client tags.

  • session_properties (dict[str, str | int | float | bool | None | list[str | int | float | bool | None | list[JsonValue] | dict[str, JsonValue]] | dict[str, str | int | float | bool | None | list[JsonValue] | dict[str, JsonValue]]] | None) – Optional Trino session properties.

  • user_env (str | None) – Environment variable for Trino user.

  • auth_env (str | None) – Environment variable for Trino auth token or password.

  • description (str | None) – Optional human-readable datasource description.

  • ai_context (AiContext | dict[str, Any] | None) – Optional AI-facing context hints for this datasource.

  • extra (dict[str, str | int | float | bool | None | list[str | int | float | bool | None | list[JsonValue] | dict[str, JsonValue]] | dict[str, str | int | float | bool | None | list[JsonValue] | dict[str, JsonValue]]] | None) – Rare JSON-safe ibis keyword arguments not modeled by the typed class.

Returns:

None

Return type:

None

Example

>>> import marivo.datasource as md
>>> md.trino(name="warehouse", host="trino.example", catalog="hive")
Constraints:

Call only from a datasource file being loaded by Marivo. Sensitive fields must use *_env references, not plaintext literals.