pacman82/odbc2parquet

Reserved Column Names not Supported

Opened this issue · 1 comments

According to the mysql documentation, when dealing with reserved words as column names, you can enclose the name with a ` or by providing fully qualified column names in the form of <table>.<column>. Would it be possible to integrate this into this tool? I could do a PR for that, but i can only test it on mysql. I am also not too familiar with Rust... I did a test by renaming the columns using python from <column> to <table>.<column> which then successfully imported.

Hello Yancik,

That would be possible. Two thoughts about this:

  • What is the use case? Are you using reserved words? Why does it matter for exporting it to parquet? From the way you describe it, I guess it is for INSERTing into a database?
  • Currently most tests here run against MsSQL which is probably fine still for this feature. If we need to test against MySQL helping me with the setup is probably best.

Usually all the database specific stuff is tested in the odbc-api crate there the tests run against multiple database systems. MySQL not among them though. https://github.com/pacman82/odbc-api
Contributions are welcome?

Would another way to solve your usecase though be the possibility to just specify your own input query. I feel this would be less convinient, but could generalize better in solving more problems also for other users.?

Best, Markus