Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 34679 invoked from network); 25 Feb 2011 17:24:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2011 17:24:04 -0000 Received: (qmail 41562 invoked by uid 500); 25 Feb 2011 17:24:03 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 41418 invoked by uid 500); 25 Feb 2011 17:24:01 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 41410 invoked by uid 500); 25 Feb 2011 17:24:00 -0000 Delivered-To: apmail-incubator-couchdb-commits@incubator.apache.org Received: (qmail 41407 invoked by uid 99); 25 Feb 2011 17:24:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 17:24:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 17:23:58 +0000 Received: from eosnew.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id B76CA297; Fri, 25 Feb 2011 17:23:25 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Fri, 25 Feb 2011 17:23:25 -0000 Message-ID: <20110225172325.16174.61320@eosnew.apache.org> Subject: =?utf-8?q?=5BCouchdb_Wiki=5D_Update_of_=22DumpOracleDbToCouchDbPython=22_?= =?utf-8?q?by_DougShawhan?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for c= hange notification. The "DumpOracleDbToCouchDbPython" page has been changed by DougShawhan. http://wiki.apache.org/couchdb/DumpOracleDbToCouchDbPython?action=3Ddiff&re= v1=3D10&rev2=3D11 -------------------------------------------------- =3D Dump an Oracle Table to CouchDB using Python =3D Since CouchDB requires unique keys to access documents, importing data fr= om an SQL database is an incitement to deep thought. = = - If you went to the trouble of creating a single unique key in your SQL da= tabase, you may be inclined to use it as your couchdb _id. Hard to go wrong= there. However, for certain groups of documents (say a collection of blog = posts), simply using a iso format date as your _id is pretty handy and can = greatly simplify writing views in both Javascript and Python. + If you went to the trouble of creating a single unique key in your SQL da= tabase, you may be inclined to use it as your couchdb _id. Hard to go wrong= there. However, for certain groups of documents (say a collection of blog = posts), simply using an IsoFormattedDateAsDocId is pretty handy and can gre= atly simplify writing views in both Javascript and Python. = The first two examples expect a unique key to be extracted from the SQL d= atabase, the third example lets CouchDB create the unique key. Of the three= , the first and last are the most useful. The second example is for static = or "throwaway tables" that have very few values, but might be a pain to jus= t hand-copy (ex. config data). =20