Skip to content

[Bug]: sourcedb to spanner does not accept spanner.tokenlist virtual columns #4204

Open

Description

@superboum

Related Template(s)

sourcedb_to_spanner_flex

Template Version

2026-08-25-00_rc00

What happened?

My Spanner (target) DDL contains this:

CREATE TABLE foo (
  id bigint GENERATED BY DEFAULT AS IDENTITY NOT NULL,
  name character varying NOT NULL,
  name_tokens spanner.tokenlist GENERATED ALWAYS AS (spanner.tokenize_substring(name)) VIRTUAL HIDDEN,
  PRIMARY KEY(id)
);

And it seems there are some validation of the Spanner supported column types, and it seems spanner.tokenlist is not accepted. But, because the column is generated, IMHO, it should be ignored as this column will be built by Spanner directly, and not by the dataflow pipeline.

Relevant log output

com.google.cloud.teleport.v2.common.UncaughtExceptionLogger - The template launch failed.
java.lang.IllegalArgumentException: Unknown spanner type spanner.tokenlist
	at com.google.cloud.teleport.v2.spanner.ddl.Column.parseSpannerType(Column.java:469)
	at com.google.cloud.teleport.v2.spanner.ddl.Column$Builder.parseType(Column.java:326)
	at com.google.cloud.teleport.v2.spanner.ddl.InformationSchemaScanner.listColumns(InformationSchemaScanner.java:200)
	at com.google.cloud.teleport.v2.spanner.ddl.InformationSchemaScanner.scan(InformationSchemaScanner.java:62)
	at com.google.cloud.teleport.v2.spanner.migrations.spanner.SpannerSchema.getInformationSchemaAsDdl(SpannerSchema.java:53)
	at com.google.cloud.teleport.v2.templates.PipelineController.executeMigrationForDbConfigContainer(PipelineController.java:65)
	at com.google.cloud.teleport.v2.source.jdbc.AbstractJdbcSrcToSpSourceConnector.executeMigration(AbstractJdbcSrcToSpSourceConnector.java:73)
	at com.google.cloud.teleport.v2.templates.SourceDbToSpanner.run(SourceDbToSpanner.java:145)
	at com.google.cloud.teleport.v2.templates.SourceDbToSpanner.main(SourceDbToSpanner.java:83)

Activity

  1. added
    bug
    on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triagep2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions