0 votes
276 views
by datalab (21.9k points) | 276 views

1 Answer

0 votes

In general, no.  This is because unless the query is written in a very general way the different column names (e.g. 'ra' vs 'ra_j2000' or 'g' vs 'gmag' vs 'mag_g') would mean the SQL may not be applicable to a particular table and would generate an error.

It is, however, possible to use the tap_schema.tables and tap_schema.columns tables to automatically discover the names of tables and columns in the system.  With this information, you could create a list in your Jupyter notebook or application that could fill out a template query string in a way that lets you substitute the columns names appropriate for that table.  You could then loop over the list of tables to submit the queries individually and save the results of each.  Note that merging the results (i.e. concatenating rows of the tables) should also take into account the differing column names.

by datalab (21.9k points)

499 questions

505 answers

497 comments

680 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.

Categories