On 5/15/15 7:05 AM, Tim Ellerton wrote:
http://stackoverflow.com/questions/30257643/reflecting-oracle-global-temp-tables-using-pythons-sqlalchemy



0down votefavorite <http://stackoverflow.com/questions/30257643/reflecting-oracle-global-temp-tables-using-pythons-sqlalchemy#>
        

I am using sqlalchemy and want to reflect the table structure of some global temp tables.

|fromsqlalchemy importMetaData...meta =MetaData()meta.reflect(bind =engine,only =['tt_employees'],schema =schema)|

I enable /'echo=True'/ when establishing the connection:

|db_engine =create_engine(engine.url.URL(**params),echo=self._echo)|

I can reflect all tables except for the global temp tables. This is because of the way sqlalchemy looks for the tables in the reflect():

|INFO sqlalchemy.engine.base.EngineSELECT table_name FROM all_tables WHERE nvl(tablespace_name,'no tablespace')NOT IN ('SYSTEM','SYSAUX')AND OWNER =:owner AND IOT_NAME IS NULL AND DURATION IS NULL|

The duration of the Oracle Global Temp Tables is 'SYS$SESSION' which is why no global temp tables reflect.

Is there anything I can do about this?


we would have to add support for this feature, so at the very least we'd need a feature request at https://bitbucket.org/zzzeek/sqlalchemy/. Implementing is most expedient if you could provide us with a pull request that includes unit tests, a test that resembles test/dialect/test_oracle.py -> DontReflectIOTTest would be an expedient format to follow.





--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com <mailto:sqlalchemy+unsubscr...@googlegroups.com>. To post to this group, send email to sqlalchemy@googlegroups.com <mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to