Skip to content

transpile-only API #48

@nvictus

Description

@nvictus

Execution APIs are vast and varied across backends, especially when it comes to sourcing/ingesting tables and eager/lazy/streaming behavior.

Let's keep giql's API solely focused on transpilation.

Proposal:

transpile(giql: str, target_dialect: Literal[...], tables: list[str | Table]) -> str

Perhaps, with convenience aliases:

giql.to_duckdb(giql: str, tables: list[str | giql.Table]) -> str

giql.to_sqlite(giql: str, tables: list[str | giql.Table]) -> str

Genomic tables must be declared in order to:

  • identify their symbols during transpilation ("name", required)
  • identify the appropriate genomic column names
  • identify the coordinate system and interval semantics
  • set the genomic pseudo-column name ("interval" by default)

Currently, column data types are not required.

The tables argument can take a list of either table names (with default attributes) or instances of a dataclass Table or perhaps an equivalent dict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions