Have a simple python application deployed on heroku and I need to manage with microsoft access database (.mdb). I read, that I have to use mdb-tools for this purposes. Example - converting mdb database to csv:
bash: mdb-export 'mdb-file' 'table-name' > result.csv
(I am going to run it as subprocess in python)
I installed https://github.com/iblogbox/heroku-buildpack-mdbtools build pack. But when I try test it:
heroku run bash
mdb-export
I get bash: mdb-export: command not found
Questions:
Thank you!
Here is answer:
You don't need heroku-buildpack-mdbtools to use several buildpacks in your heroku application.
Following this arcticle ( https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app ) You can use following
bash: heroku buildpacks:set your-first-buildpack
then
bash: heroku buildpacks:add --index 1 your-additional-buildpack
I used heroku/python + https://github.com/profit-strategies/heroku-buildpack-mdbtools to convert .mdb database (WHO STILL USES MICROSOFT ACCESS IN 2016???) to csv in linux by this command: mdb-export 'mdb-file' 'table-name' > result.csv
Just runned this command as a subprocess in python
subprocess.call("mdb-export '%s' 'colorado well completions' > Temporary/result.csv" % path_to_mdb, shell=True)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.