

Using Python and Beautiful Soup to create SQL Well, that’s all well and good, but how do we get from here to a MySQL table ? Note the last half of this screenshot contains the data associated with the first two rows of the table Here is the beginning of the XML produced for a table “dx” which contains 3 columns, and contains 586 rows. With a little Googling, I realized there was an XML option, which produces an XML formatted file which contains both the table structure as well as the data. This might not be too bad for a single table, but I was looking at about 50 tables and this would have been too laborious. I could find no way to export a table’s structure as SQL, so I would have had to manually build the table definition on the SQL side and then import the CSV. The problem I encountered here was this decoupled the table structure from the table data (which was contained in the CSV). My first pass at a solution was to export a table into a CSV file and then import into MySQL.

The interface is quite intuitive, so I was able to open and look at any of the tables. I first downloaded the 2 week free trial of FileMaker Pro for Windows to see what I could do with the files I had. I preface this with the fact that I do not really know the FileMaker software, so there may be an easier way to accomplish these steps, but this method produced the methods well enough for a one time project.Įxport each table in Filemaker in XML format The following is an overview of the steps I followed. Using a 2 week trial of FileMaker on Windows, and some Python coding using the BeautifulSoup package, I was able to convert the FileMaker database to MySQL. Another problem was that he no longer HAD his Mac, so did not have a copy of the FileMaker software, just the. He wanted some help deploying to a Web based interface and I agreed to help on the condition that we move the data to MySQL, as I don’t have any skills in the Mac world. A friend of mine studies Chinese medicine and had painstakingly entered a decent amount of data into a FileMaker database on his Mac.
