Skip to content

Commit

Permalink
Fix for single quotes in table names, closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Mar 11, 2021
1 parent 5da6a56 commit 0d35769
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tableau_to_sqlite/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ def cli(db_path, tableau_views):
dashboard = ts.getDashboard()
conn = sqlite3.connect(str(db_path))
for worksheet in dashboard.worksheets:
worksheet.data.to_sql(worksheet.name, conn)
worksheet.data.to_sql(fix_name(worksheet.name), conn)


def fix_name(name):
return name.replace("'", "").replace('"', "")

0 comments on commit 0d35769

Please sign in to comment.