[sqlalchemy] Re: metadata reflecting all schemas

2008-11-30 Thread [EMAIL PROTECTED]

any sqlalchemy ways of retrieving a list of schemas?

On Nov 30, 1:23 pm, Michael Bayer [EMAIL PROTECTED] wrote:
 On Nov 29, 2008, at 6:05 PM, [EMAIL PROTECTED] wrote:



  Thanks Michael

  If its just a warning and its supposed to continue past it, Why
  doesn't it finish reflecting all the tables in all the schemas instead
  of a few tables in two schemas.

 that would be a different issue.   But I would note that
 metadata.reflect() only reflects one schema at a time, either the
 tables within the default schema, or those within the schema name
 which you specify.

  I think it retrieved all the tables in the first schema which i
  specified and followed the foreign keys to retrieve the metadata for
  the second tables.

 that's what it would do, yup.

  Any suggestions on how i can reflect a list of schemas or make it
  reflect all the schemas? it didn't like '%' as the schema name.

 you have to retreive the list of desired schemas manually, then call
 reflect() for each one.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: metadata reflecting all schemas

2008-11-30 Thread Michael Bayer

not currently !  you'd have to issue the correct SQL for that database.

On Nov 30, 2008, at 4:18 AM, [EMAIL PROTECTED] wrote:


 any sqlalchemy ways of retrieving a list of schemas?

 On Nov 30, 1:23 pm, Michael Bayer [EMAIL PROTECTED] wrote:
 On Nov 29, 2008, at 6:05 PM, [EMAIL PROTECTED] wrote:



 Thanks Michael

 If its just a warning and its supposed to continue past it, Why
 doesn't it finish reflecting all the tables in all the schemas  
 instead
 of a few tables in two schemas.

 that would be a different issue.   But I would note that
 metadata.reflect() only reflects one schema at a time, either the
 tables within the default schema, or those within the schema name
 which you specify.

 I think it retrieved all the tables in the first schema which i
 specified and followed the foreign keys to retrieve the metadata for
 the second tables.

 that's what it would do, yup.

 Any suggestions on how i can reflect a list of schemas or make it
 reflect all the schemas? it didn't like '%' as the schema name.

 you have to retreive the list of desired schemas manually, then call
 reflect() for each one.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: metadata reflecting all schemas

2008-11-29 Thread [EMAIL PROTECTED]

Or maybe this is my problem

/home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
1237: SAWarning: Did not recognize type 'name' of column 'USERNAME'
  self.dialect.reflecttable(conn, table, include_columns)
/home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
1237: SAWarning: Did not recognize type 'name' of column 'SCHEMA_NAME'
  self.dialect.reflecttable(conn, table, include_columns)
/home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
1237: SAWarning: Did not recognize type 'name' of column 'TABLE_NAME'
  self.dialect.reflecttable(conn, table, include_columns)
/home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
1237: SAWarning: Did not recognize type 'name' of column 'FIELD_NAME'
  self.dialect.reflecttable(conn, table, include_columns)

I use the 'name' column data type for my columns.
Its a postgresql database.

engine = create_engine('postgres://.')

engine
metadata = MetaData()
metadata.reflect(engine,'')

for t in metadata.tables.values():
print t.fullname
for c in t.columns:
print \t + c.name

I get a partial listing which as two different schemas in it. Is the
reflect bombing out when it hits the above errors?
If so, I will need to try and get sqlalchemy to accept this field
type.

Regards, Jar

On Nov 29, 10:34 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi
 I was wondering if there was a way to reflect all schemas in the
 metadata, or get a list of schemas in the database with out querying
 the catalog for postgresql.

 Regards, Jar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: metadata reflecting all schemas

2008-11-29 Thread Michael Bayer

the type is not recognized but the reflection operation should  
succeed.  thats why you're only getting a warning on those.



On Nov 29, 2008, at 8:00 AM, [EMAIL PROTECTED] wrote:


 Or maybe this is my problem

 /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
 1237: SAWarning: Did not recognize type 'name' of column 'USERNAME'
  self.dialect.reflecttable(conn, table, include_columns)
 /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
 1237: SAWarning: Did not recognize type 'name' of column 'SCHEMA_NAME'
  self.dialect.reflecttable(conn, table, include_columns)
 /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
 1237: SAWarning: Did not recognize type 'name' of column 'TABLE_NAME'
  self.dialect.reflecttable(conn, table, include_columns)
 /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
 1237: SAWarning: Did not recognize type 'name' of column 'FIELD_NAME'
  self.dialect.reflecttable(conn, table, include_columns)

 I use the 'name' column data type for my columns.
 Its a postgresql database.

engine = create_engine('postgres://.')

engine
metadata = MetaData()
metadata.reflect(engine,'')

for t in metadata.tables.values():
print t.fullname
for c in t.columns:
print \t + c.name

 I get a partial listing which as two different schemas in it. Is the
 reflect bombing out when it hits the above errors?
 If so, I will need to try and get sqlalchemy to accept this field
 type.

 Regards, Jar

 On Nov 29, 10:34 pm, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 Hi
 I was wondering if there was a way to reflect all schemas in the
 metadata, or get a list of schemas in the database with out querying
 the catalog for postgresql.

 Regards, Jar
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: metadata reflecting all schemas

2008-11-29 Thread [EMAIL PROTECTED]

Thanks Michael

If its just a warning and its supposed to continue past it, Why
doesn't it finish reflecting all the tables in all the schemas instead
of a few tables in two schemas.
I think it retrieved all the tables in the first schema which i
specified and followed the foreign keys to retrieve the metadata for
the second tables.

Any suggestions on how i can reflect a list of schemas or make it
reflect all the schemas? it didn't like '%' as the schema name.

On Nov 30, 4:42 am, Michael Bayer [EMAIL PROTECTED] wrote:
 the type is not recognized but the reflection operation should  
 succeed.  thats why you're only getting a warning on those.

 On Nov 29, 2008, at 8:00 AM, [EMAIL PROTECTED] wrote:



  Or maybe this is my problem

  /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
  1237: SAWarning: Did not recognize type 'name' of column 'USERNAME'
   self.dialect.reflecttable(conn, table, include_columns)
  /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
  1237: SAWarning: Did not recognize type 'name' of column 'SCHEMA_NAME'
   self.dialect.reflecttable(conn, table, include_columns)
  /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
  1237: SAWarning: Did not recognize type 'name' of column 'TABLE_NAME'
   self.dialect.reflecttable(conn, table, include_columns)
  /home/jchesney/workspace/sqlalchemy/lib/sqlalchemy/engine/base.py:
  1237: SAWarning: Did not recognize type 'name' of column 'FIELD_NAME'
   self.dialect.reflecttable(conn, table, include_columns)

  I use the 'name' column data type for my columns.
  Its a postgresql database.

     engine = create_engine('postgres://.')

     engine
     metadata = MetaData()
     metadata.reflect(engine,'')

     for t in metadata.tables.values():
         print t.fullname
         for c in t.columns:
             print \t + c.name

  I get a partial listing which as two different schemas in it. Is the
  reflect bombing out when it hits the above errors?
  If so, I will need to try and get sqlalchemy to accept this field
  type.

  Regards, Jar

  On Nov 29, 10:34 pm, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
  Hi
  I was wondering if there was a way to reflect all schemas in the
  metadata, or get a list of schemas in the database with out querying
  the catalog for postgresql.

  Regards, Jar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: metadata reflecting all schemas

2008-11-29 Thread Michael Bayer


On Nov 29, 2008, at 6:05 PM, [EMAIL PROTECTED] wrote:


 Thanks Michael

 If its just a warning and its supposed to continue past it, Why
 doesn't it finish reflecting all the tables in all the schemas instead
 of a few tables in two schemas.

that would be a different issue.   But I would note that  
metadata.reflect() only reflects one schema at a time, either the  
tables within the default schema, or those within the schema name  
which you specify.

 I think it retrieved all the tables in the first schema which i
 specified and followed the foreign keys to retrieve the metadata for
 the second tables.

that's what it would do, yup.

 Any suggestions on how i can reflect a list of schemas or make it
 reflect all the schemas? it didn't like '%' as the schema name.

you have to retreive the list of desired schemas manually, then call  
reflect() for each one.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---