0 votes
asked May 28, 2017 by datalab (3,060 points) | 35 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.

answered Jun 7, 2017 by datalab (3,060 points)

82 questions

65 answers


288 users

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