GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator

Spanner: PostgreSQL Dialect

Open
#1,725 0 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Python
Stars
524
Forks
171
Avg merge
5d 15h
Merged PRs (30d)
4

Description

**Describe the bug**
When running commands against Spanner Database with PostgreSQL dialect, the tool returns an unclear error related to backticks (works fine for Spanner databases with GoogleSQL dialect).

**What version of DVT are you using?**
Ex: 8.5.2

**What type of connections are you using for source and target?**
AlloyDB for source, Spanner with PostgreSQL dialect for target

**Steps to reproduce the behavior**
1.
```
data-validation connections add --connection-name alloydb Postgres \
--host 10.30.0.25 \
--port 5432 \
--user postgres \
--password alloydb123 \
--database test_v2
```

2.
```
data-validation connections add \
--connection-name spanner Spanner \
--project-id reve-ai-26 \
--instance-id nodes-test \
--database-id postgres_2026-03-26_1607-774c
```

3.
```
data-validation validate custom-query row -sc alloydb -tc spanner --source-query "SELECT * FROM public.my_table_01 LIMIT 50" --target-query "SELECT * FROM my_table_01 LIMIT 50" --primary-keys id --hash '*'
```

4. See error
```
Traceback (most recent call last):
File "/home/admin_azulz_altostrat_com/venv/lib/python3.11/site-packages/google/api_core/grpc_helpers.py", line 149, in error_remapped_callable
return _StreamingResponseIterator(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/admin_azulz_altostrat_com/venv/lib/python3.11/site-packages/google/api_core/grpc_helpers.py", line 71, in __init__
self._stored_first_result = next(self._wrapped)
^^^^^^^^^^^^^^^^^^^
File "/home/admin_azulz_altostrat_com/venv/lib/python3.11/site-packages/grpc/_channel.py", line 538, in __next__
return self._next()
^^^^^^^^^^^^
File "/home/admin_azulz_altostrat_com/venv/lib/python3.11/site-packages/grpc/_channel.py", line 956, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "[ERROR] syntax error at or near "`""
debug_error_string = "UNKNOWN:Error received from peer ipv4:74.125.135.95:443 {grpc_message:"[ERROR] syntax error at or near \"`\"", grpc_status:3}"
>
```

**Screenshots**

Image

**How are you executing DVT?**
CLI commands on VM

**Additional context**
I believe this is occurring because DVT is configured to generate only GoogleSQL queries, which use backticks, while the PostgreSQL dialect does not support them

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.