python-featured

CSV data with Python/pureXML

This tutorial is geared towards developers who want to learn how to store data in XML format in a database, connect to DB2 from a Python application, and learn how to convert data from CSV files into XML documents. No prior knowledge of Python is assumed (you will learn how to install it in this [...]

Author :  Joe Lennon
Joe is a 25-year-old web applications developer and technical writer from Cork, Ireland. For his day job, Joe builds web applications in PL/SQL and JavaScript for Core International, a leading provider of enterprise HR software in Ireland and the UK. Joe is also a published author, having his debut book, "Beginning CouchDB" published in 2009 by Apress. In addition, Joe is a regular contributing author to IBM's developerWorks technical library website. Joe is also contributing to a forthcoming IBM Press book, "Getting Started with .NET and DB2". Aside from software, Joe enjoys gaming, TV, eating out, motoring and frequent holidays in Spain. He lives in Cork with his girlfriend, Jill and their dog, Toby.

This tutorial is geared towards developers who want to learn how to store data in XML format in a database, connect to DB2 from a Python application, and learn how to convert data from CSV files into XML documents. No prior knowledge of Python is assumed (you will learn how to install it in this tutorial), but it would be advantageous. This tutorial assumes that you use a Microsoft® Windows® operating system, but the code should work on other platforms without modification. When you complete this tutorial, you will have the skills to create powerful Python applications that can communicate and interact with an IBM DB2 database and harness the power that pureXML offers.

IBM® DB2® pureXML® allows you to store XML data natively in a relational database management system, giving you the power and flexibility to report on this data without disturbing the advantages that its XML format offers. In this tutorial, you will learn how to connect to a DB2 database from the Python programming language, importing data about population from the United States Census Bureau. You will use Python to convert this CSV file into XML, before inserting this XML data natively into DB2. Finally, you will use Python to create a command-line application that produces some informative tables that you can access through a menu system.

Read the tutorial at http://www.ibm.com/developerworks/xml/tutorials/x-csvdb2pytut/

Leave a Reply