<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic cx_Oracle and python to move table data to numpy array in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cx-oracle-and-python-to-move-table-data-to-numpy/m-p/448150#M35151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a question regarding moving some table data from an Oracle DB to a numpy arrays. I've looked into the possibility of using cx_Oracle to access my Oracle DB and read data (tested, works) and now I'd like to make numpy arrays out of the data to work with the table data locally. The thing is, I don't know the table/field structure of the source data before I begin, so I can't really hardcode the numpy.dptyp() field types up front. Do anyone know if there is a way of getting this from the Oracle DB using cx_Oracle so I can build the numpy.dptyp() for each table? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, of course, is there a better way of achieving this that I haven't thought of? (Let's assume I don't have access to arcpy and Oracle connections there...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 May 2015 14:53:14 GMT</pubDate>
    <dc:creator>HåvardMoe</dc:creator>
    <dc:date>2015-05-07T14:53:14Z</dc:date>
    <item>
      <title>cx_Oracle and python to move table data to numpy array</title>
      <link>https://community.esri.com/t5/python-questions/cx-oracle-and-python-to-move-table-data-to-numpy/m-p/448150#M35151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a question regarding moving some table data from an Oracle DB to a numpy arrays. I've looked into the possibility of using cx_Oracle to access my Oracle DB and read data (tested, works) and now I'd like to make numpy arrays out of the data to work with the table data locally. The thing is, I don't know the table/field structure of the source data before I begin, so I can't really hardcode the numpy.dptyp() field types up front. Do anyone know if there is a way of getting this from the Oracle DB using cx_Oracle so I can build the numpy.dptyp() for each table? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, of course, is there a better way of achieving this that I haven't thought of? (Let's assume I don't have access to arcpy and Oracle connections there...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 14:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cx-oracle-and-python-to-move-table-data-to-numpy/m-p/448150#M35151</guid>
      <dc:creator>HåvardMoe</dc:creator>
      <dc:date>2015-05-07T14:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: cx_Oracle and python to move table data to numpy array</title>
      <link>https://community.esri.com/t5/python-questions/cx-oracle-and-python-to-move-table-data-to-numpy/m-p/448151#M35152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://cx-oracle.readthedocs.org/en/latest/cursor.html#Cursor.description"&gt;Cursor.description&lt;/A&gt; will provide you the information you need, but you will have to create a mapping between cx_Oracle types and NumPy types.&amp;nbsp; It might also be worth checking out &lt;A href="https://github.com/esheldon/espy/blob/master/oracle_util.py"&gt;oracle_util.py &lt;/A&gt;on GitHub.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 00:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cx-oracle-and-python-to-move-table-data-to-numpy/m-p/448151#M35152</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-05-08T00:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: cx_Oracle and python to move table data to numpy array</title>
      <link>https://community.esri.com/t5/python-questions/cx-oracle-and-python-to-move-table-data-to-numpy/m-p/448152#M35153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.. The cursor.description seems to be what I'm looking for. The results from there should be parseable per table, and should be useable to create my numpy tables &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll have a look at oracle_util.py as well. I've looked into it before and didn't quite like that it required a hack to cx_Oracle. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 12:43:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cx-oracle-and-python-to-move-table-data-to-numpy/m-p/448152#M35153</guid>
      <dc:creator>HåvardMoe</dc:creator>
      <dc:date>2015-05-08T12:43:55Z</dc:date>
    </item>
  </channel>
</rss>

