fix: Add dataset ID to file name on exports (#34782)

This commit is contained in:
Vitor Avila
2025-08-25 14:54:27 -03:00
committed by GitHub
parent b381992a75
commit 471d9fe737
7 changed files with 77 additions and 8 deletions

View File

@@ -132,6 +132,10 @@ def test_export(session: Session) -> None:
extra=json.dumps({"warning_markdown": "*WARNING*"}),
)
# Add the table to the session and flush to get an ID
db.session.add(sqla_table)
db.session.flush()
export = [
(file[0], file[1]())
for file in list(
@@ -148,7 +152,7 @@ def test_export(session: Session) -> None:
assert export == [
(
"datasets/my_database/my_table.yaml",
f"datasets/my_database/my_table_{sqla_table.id}.yaml",
f"""table_name: my_table
main_dttm_col: ds
description: This is the description