separate columns by tabs instead of single space in sql sample rows (#1348)

Use tabs to separate columns instead of a single space - confusing when
there are spaces in a cell
This commit is contained in:
Jon Luo
2023-02-28 21:59:53 -05:00
committed by GitHub
parent 6c629b54e6
commit 35f1e8f569
2 changed files with 13 additions and 5 deletions

View File

@@ -133,7 +133,7 @@ class SQLDatabase:
)
# save the columns in string format
columns_str = " ".join([col.name for col in table.columns])
columns_str = "\t".join([col.name for col in table.columns])
try:
# get the sample rows
@@ -145,7 +145,7 @@ class SQLDatabase:
)
# save the sample rows in string format
sample_rows_str = "\n".join([" ".join(row) for row in sample_rows])
sample_rows_str = "\n".join(["\t".join(row) for row in sample_rows])
# in some dialects when there are no rows in the table a
# 'ProgrammingError' is returned