On Fri, May 9, 2008 at 4:46 AM, <[EMAIL PROTECTED]> wrote:
>
> On Friday 09 May 2008 03:05, Lukasz Szybalski wrote:
>> Do you guys know what would give me column definition of table?
> do u want it as generated source-text or what?
Yes. The Final output I would like is the txt version of db definitions.
autoload ---> sqlalchemy.Column('Address_Sid', sqlalchemy.Integer,
primary_key=True),
> have a look at dbcook/dbcook/misc/metadata/autoload.py
> at dbcook.sf.net
>
>
>> I have a table that I autoload and I would like to get this:
>>
>> address_table = sqlalchemy.Table('address', metadata,
>> sqlalchemy.Column('Address_Sid', sqlalchemy.Integer, primary_key=True),
>> sqlalchemy.Column('FirstName', sqlalchemy.Unicode(40),nullable=False),
>> sqlalchemy.Column('LastName', sqlalchemy.Unicode(40),nullable=False),
>> sqlalchemy.Column('MaidenLastName', sqlalchemy.Unicode(40)),
>> sqlalchemy.Column('Email', sqlalchemy.Unicode(80),nullable=False),
>>
>>
>> So:
>> I can get a list of tables:
>> for i in metadata.tables:
>> ... print i
>>
>> list of columns:
>> for i in metadata.tables['WMI'].original_columns:
>> ... print i
>>
>> How do I get column type, indexes and primary keys?
>>
>> Lucas
>>
>> On Tue, Apr 15, 2008 at 7:44 PM, Lukasz Szybalski <[EMAIL PROTECTED]>
> wrote:
>> > Hello,
>> > Is there maybe a feature in sqlalchemy that would allow me to autoload
>> > table from one database, and move it over to another database?
>> >
>> > 1. I would like to print data structure from autoload table. (then
>> > copy and paste it into new file and use it to create new
>> > table)(without typing every data structure)
>> > 2. And/or autoload via one engine and autoupload via different engine
>> > and create_all()
>> > 3. Analyze csv files and create sqlalchemy definition like structure.
>> >
>> > Ideas?
>> >
>> > Lucas
>
> >
>
--
Automotive Recall Database. Cars, Trucks, etc.
http://www.lucasmanual.com/recall/
TurboGears Manual-Howto
http://lucasmanual.com/pdf/TurboGears-Manual-Howto.pdf
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---