Skip to content

GAIA: The function upload_table in the TapPlus class must not allow table names that contain a dot#2971

Merged
bsipocz merged 3 commits into
astropy:mainfrom
esdc-esac-esa-int:ESA_gaia_avoid_upload_tables_with_dots
Mar 18, 2024
Merged

GAIA: The function upload_table in the TapPlus class must not allow table names that contain a dot#2971
bsipocz merged 3 commits into
astropy:mainfrom
esdc-esac-esa-int:ESA_gaia_avoid_upload_tables_with_dots

Conversation

@cosmoJFH

@cosmoJFH cosmoJFH commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

If a table name that contains a dot is used in the function upload_table, the corresponding table in the Gaia ESA Archive cannot be accessed/removed . The following example describes the issue.

 

from astroquery.gaia import Gaia 
from astropy.table import Table 
a=[1,2,3] b=['a','b','c'] 
table = Table([a,b], names=['col1','col2'], meta={'meta':'first table'}) 

# Upload 
Gaia.login() 
Gaia.upload_table(upload_resource=table, table_name='hola.table_test_from_astropy')

The previous commands generated the following table in the archive

image


A posible solution is to check whether the table name passed to the function upload_table, contains a dot.


cc @esdc-esac-esa-int


Jira: GAIAMNGT-1548

Jorge Fernandez Hernandez added 2 commits March 18, 2024 18:01
@codecov

codecov Bot commented Mar 18, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.81%. Comparing base (b530378) to head (3404e94).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2971      +/-   ##
==========================================
+ Coverage   66.80%   66.81%   +0.01%     
==========================================
  Files         237      237              
  Lines       18321    18323       +2     
==========================================
+ Hits        12239    12243       +4     
+ Misses       6082     6080       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bsipocz bsipocz added the gaia label Mar 18, 2024
@bsipocz bsipocz added this to the v0.4.8 milestone Mar 18, 2024

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good, thank you! I'll move the changelog and the merge.

Comment thread CHANGES.rst Outdated

- Default Gaia catalog updated to DR3. [#2596]

- The function upload_table in the TapPlus class does not allow table names that contain a dot. [#2971]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to go in the section for the new release. I'll fix it prior merging.

@bsipocz bsipocz merged commit 722385a into astropy:main Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants