Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape table name to allow for keywords conflict #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 24, 2021

  1. Escape table name to allow for keywords conflict

    ### Example
    ```bash
    $ sas2db --db is.db --table is ~/Downloads/is.sas7bdat
    Writing to is.db in sqlite using pysqlite...                                                                        
    Writing to is table...                                                                                              
    Traceback (most recent call last):                                                                                  
      File "/Users/***/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1772, in _execute_context
        cursor, statement, parameters, context                                                                          
      File "/Users/***/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute
        cursor.execute(statement, parameters)                                                                           
    sqlite3.OperationalError: near "is": syntax error
    ```
    
    ### With the fix
    ```
    Writing to is.db in sqlite using pysqlite...
    Writing to is table...
    Wrote *** rows.
    ```
    bbgw authored Sep 24, 2021
    Configuration menu
    Copy the full SHA
    fe79aa6 View commit details
    Browse the repository at this point in the history