Local seed path containing a single quote breaks the DuckDB query
Maintainers usually reply within 1 day
@xubenqiang is already working on this.
Since Oct 28, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
Research direction
Read packages/data-designer-engine/src/data_designer/engine/resources/seed_reader.py, focusing on get_seed_dataset_size, get_column_names and both branches of build_dataset_read_query. Start by checking how each method builds its DuckDB SQL literal and look for existing seed reader tests. Done means a local seed path containing a single quote works for column names, row counts and dataset reads; run the relevant tests and add coverage for that path.
Written by the indexing model from the issue text.
Description
Priority Level
Low (Cosmetic / Minor)
Describe the bug
A local seed file whose path contains a single quote can't be read. SeedReader puts the dataset URI into DuckDB SQL as a quoted string literal without escaping it, so a ' anywhere in the path ends the literal early and DuckDB fails with a parser error. It happens with a directory like o'brien/ or anything under a home directory with an apostrophe in the user name.
The literal is built in four places in packages/data-designer-engine/src/data_designer/engine/resources/seed_reader.py on current main (4bb221eb). Those are get_seed_dataset_size (line 301), get_column_names (line 352) and both branches of build_dataset_read_query (lines 381 and 386), all in the form
f"SELECT COUNT(*) FROM '{self.get_dataset_uri()}'"
Steps/Code to reproduce bug
import os
import pandas as pd
import data_designer.config as dd
from data_designer.interface import DataDesigner
os.makedirs("o'brien", exist_ok=True)
pd.DataFrame({"name": ["a", "b"]}).to_parquet("o'brien/seed.parquet")
builder = dd.DataDesignerConfigBuilder()
builder.with_seed_dataset(dd.LocalFileSeedSource(path="o'brien/seed.parquet"))
builder.add_column(dd.ExpressionColumnConfig(name="greeting", expr="hi {{ name }}"))
result = DataDesigner(artifact_path="./artifacts").preview(builder, num_records=2)
print(result.dataset)
On main at 4bb221eb with Python 3.14 and duckdb 1.5.0 this gives (path shortened)
data_designer.interface.errors.DataDesignerGenerationError: 🛑 Error generating preview dataset: Parser Error: syntax error at or near "/"
LINE 1: ...o'brien/seed.parquet'
^
The same script with the directory renamed to obrien works.
Expected behavior
The seed should load the same as from any other path.
Agent Diagnostic / Prior Investigation
Calling LocalFileSeedReader directly shows both get_column_names() and get_seed_dataset_size() failing with the same ParserException, so it's not specific to preview. In DuckDB a ' inside a string literal is written as '', and with the path escaped that way SELECT COUNT(*) FROM '...o''brien/seed.parquet' and the DESCRIBE query both work. The other readers aren't affected in practice. DataFrameSeedReader and the filesystem readers use the fixed table name df, and HuggingFaceSeedReader builds hf:// paths from repo ids. I searched issues and PRs for quote, apostrophe, seed path and get_dataset_uri and didn't find this reported.
Additional context
The fix I'd suggest is a small helper in SeedReader that doubles single quotes when building the SQL literal, used in those four spots. get_dataset_uri() itself should keep returning the raw path, since get_storage_plan also uses it with Path and glob. Happy to send a PR with tests once it's triaged.
Checklist
- I reproduced this issue or provided a minimal example
- I searched the docs/issues myself, or had my agent do so
- If I used an agent, I included its diagnostics above
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 258
- Avg merge
- 4d 20m
- Merged PRs (30d)
- 32
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA-NeMo/DataDesigner
-
Judge score profiler samples reasoning with squared category weights, crowding out uncommon scoresOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NVIDIA-NeMo/DataDesigner#1202 ·
Maintainers usually reply within 1 day
-
enforce \from future import annotations` via ruff FA102 rule`May be free again A pull request for this issue was closed without being merged. Opentask
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NVIDIA-NeMo/DataDesigner#760 ·
Maintainers usually reply within 1 day
-
NVIDIA-NeMo/DataDesigner#1205 ·
Maintainers usually reply within 1 day
-
NVIDIA-NeMo/DataDesigner#1204 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
NVIDIA-NeMo/DataDesigner#1203 ·
Maintainers usually reply within 1 day
All issues in NVIDIA-NeMo/DataDesigner
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day