The fix I'd like to propose is to lower column names before running pandas' 
to_sql()
```
> pd.DataFrame({'A': range(10)}).to_sql('table_2', engine)
> pd.DataFrame({'a': range(10)}).to_sql('table_2', engine)
...
> cur.execute("select a from table_1")
> print(cur.fetchall())
---------------------------------------------------------------------------
ProgrammingError                          Traceback (most recent call last)
<ipython-input-54-a6e1e7bd84f4> in <module>()
----> 1 cur.execute("select a from table_1")
      2 print(cur.fetchall())

ProgrammingError: column "a" does not exist
LINE 1: select a from table_1
...
> cur.execute("select a from table_2")
> print(cur.fetchall())
[(0,), (1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,)]
```

[ Full content available at: 
https://github.com/apache/incubator-superset/issues/6009 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to