[AstroPy] Question about Atpy with MySQL
Dr. Juan E Cabanela Ph.D.
cabanela at mnstate.edu
Fri May 27 17:54:07 EDT 2011
On May 27, 2011, at 4:37 PM, Thomas Robitaille wrote:
> Hi Juan,
> Thanks for spotting the typos in the documentation. It should now be fixed:
> Let me know if you run into any other issues!
The only other thing that isn't clear form the documentation is that to write to the MySQL database, I found you need to declare the table name before the call to create the database:
>>> t.table_name = "velocities"
>>> t.write('mysql', user='monty', passwd='spam',
Passing "table='velocities'" as an argument for the write command didn't appear to work for me, so I had to declare the table_name value first. If this isn't the way it is supposed to work, please let me know.
There also doesn't appear to be a clear way to _overwrite_ an existing MySQL table. I imagine if I dig around the documentation, I would find it, but it would be nice if the scheme was documented. I DO like the fact protect exists against automatically overwriting MySQL tables.
Dr. Juan Cabanela 218-477-2453 (V) 218-477-2290 (F)
Minnesota State University Moorhead WWW: http://www.cabanela.com/
Dept. of Physics and Astronomy Twitter: Juan_Kinda_Guy
1104 Seventh Ave South, Hagen 307B IM: AstroJuanCab (AIM)
Moorhead, MN 56563 cabanela at mnstate.edu (MSN)
juancab at gmail.com (GTalk)
Public PGP Key available at: http://www.cabanela.com/juan_public.asc
More information about the AstroPy