Skip to content

Automatically detect Spanner database dialect instead of manual specification #2389

@averikitsch

Description

@averikitsch

Prerequisites

What are you trying to do that currently feels hard or impossible?

Users must explicitly set the dialect in their source configuration:

sources:  
  my-spanner-source:  
    kind: "spanner"  
    project: "my-project"  
    instance: "my-instance"  
    database: "my_db"  
    dialect: "postgresql"  # Manual specification required

The dialect defaults to "googlesql" if not specified, but this may not match the actual database dialect. There is configuration overhead when this could be fetch from metadata.

Suggested Solution(s)

Implement automatic dialect detection by querying the Spanner database metadata during source initialization. The system should:

Connect to the database using a dialect-agnostic approach
Query the database dialect from Spanner's system tables or API
Set the dialect automatically based on the detected value

Alternatives Considered

No response

Additional Details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions