Skip to content

Commit c9bf976

Browse files
committed
Updated documentation for the new features added to utils.Tap and Gaia.
Updated file CHANGES.rst with the new enhancements added to the current version.
1 parent 0ede38b commit c9bf976

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

CHANGES.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,4 +1133,4 @@ Infrastructure, Utility and Other Changes and Additions
11331133
0.1 (2013-09-19)
11341134
================
11351135

1136-
- Initial release. Includes features!
1136+
- Initial release. Includes features!

docs/gaia/gaia.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,26 @@ will be able to access to your shared table in a query.
862862
>>> Gaia.login()
863863
>>> Gaia.share_table_stop(table_name="user_<user_login_name>.my_table", group_name="my_group")
864864
865+
2.7.8. Rename Table
866+
~~~~~~~~~~~~~~~~~~~~
867+
868+
This query allows the user to rename a table and/or its columns names. For this method it is only mandatory
869+
to provide the old name of the table and at least one of the following parameters: new table name and/or
870+
new columns names. Here is an example:
871+
872+
873+
.. code-block:: python
874+
875+
>>>from astroquery.gaia import Gaia, GaiaClass
876+
>>>from astroquery.utils.tap.model.tapcolumn import TapColumn
877+
>>>from astroquery.utils.tap.core import TapPlus, TAP_CLIENT_ID
878+
>>>from astroquery.utils.tap import taputils
879+
>>>gaia = GaiaClass(gaia_tap_server='https://<env>.esac.esa.int/', gaia_data_server='https://<env>.esac.esa.int/')
880+
>>>gaia.login()
881+
>>>tableName = 'user_<user_login_name>.my_old_table_name'
882+
>>>newTableName = 'user_<user_login_name>.my_new_table_name'
883+
>>>newColumnNames = {'old_col_name1': 'new_col_name1', 'old_col_name2': 'new_col_name2'}
884+
>>>gaia.rename_table(table_name=tableName, new_table_name=newTableName, new_column_names_dict=newColumnNames,verbose=True)
865885
866886
Reference/API
867887
=============

0 commit comments

Comments
 (0)