Skip to content

API Reference parrot.tools.dataset_manager.spatial._ibis_probe

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.tools.dataset_manager.spatial._ibis_probe

View source

THROWAWAY: Ibis connection spike for FEAT-219 Module 2.

Decision gate: can TableSource._get_connection_args() map cleanly onto ibis.postgres.connect() / ibis.bigquery.connect() without a translation shim?

Run: python -m parrot.tools.dataset_manager.spatial._ibis_probe (requires ibis-framework[postgres,bigquery] to be installed first)

OUTCOME: NO-GO — see TASK-1437 Completion Note.

Mapping analysis (code inspection, NOT runtime execution — ibis not installed):

pg credentials dict (from _resolve_credentials / _get_connection_args): {'host': ..., 'port': ..., 'database': ..., 'user': ..., 'password': ...}

ibis.postgres.connect() signature (ibis >= 9): ibis.postgres.connect(host=, port=, database=, user=, password=) -> DIRECT MATCH: no shim needed for pg.

ibis.bigquery.connect() signature: ibis.bigquery.connect(project_id=, credentials=<google.oauth2.Credentials | None>) -> credentials key matches, BUT ibis expects a google.oauth2.Credentials object. navconfig stores a Path. Conversion requires: creds = google.oauth2.service_account.Credentials.from_service_account_file(path) This is a one-liner shim, but it introduces an implicit google-auth dependency and diverges from the asyncdb pattern where AsyncDB handles auth internally.

Decision: NO-GO Rationale:

  • ibis-framework is not yet a project dependency; adding it introduces risk.
  • DSN translation for pg (asyncpg → psycopg format) is non-trivial.
  • BigQuery credentials require an extra shim (Path → google.oauth2.Credentials).
  • The fallback (~2 hand-written SQL dialect templates) is pre-approved (spec §8, brainstorm Option C) and keeps the SpatialCompiler free of a new heavy dependency.
  • compile() stays pure (I/O-free, syrupy-snapshotable) either way.
  • TASK-1438 will use hand-written ST_DWITHIN dialect templates.

This file may be deleted before or after TASK-1438 — it exists only to document the decision for TASK-1438 to inherit.

Attribute BIGQUERY_MAPPING

dict: navconfig bigquery key → ibis bigquery key mapping.

Attribute OUTCOME

str: The spike outcome. TASK-1438 uses hand-written dialect templates.

Attribute PG_MAPPING

dict: navconfig pg key → ibis pg key mapping (all direct, but DSN needs conversion).

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally