diff --git a/01-query.html b/01-query.html index 0428b830..6d8df5f8 100644 --- a/01-query.html +++ b/01-query.html @@ -289,10 +289,10 @@
This episode demonstrates the steps for selecting and downloading data from the Gaia Database:
@@ -403,8 +402,7 @@In order to select data from a database, you need to compose a query, which is a program written in a “query language”. The query language we will use is ADQL, which stands for “Astronomical Data Query @@ -416,8 +414,7 @@
If you have not worked with Jupyter notebooks before, you might start
with the tutorial on from Jupyter.org
called “Try Classic Notebook”, or this
@@ -452,8 +449,7 @@ OutlineConnecting to Gaia
-
+
The library we will use to get Gaia data is Astroquery.
Astroquery provides Gaia
, which is an object
that represents a connection to the Gaia database.
if you are using a version of astroquery that’s older than v0.4.4, you may see this output
@@ -493,8 +488,7 @@This import statement creates a TAP+ connection; TAP stands for “Table Access Protocol”, which is a network protocol for sending queries to the database and getting back the results.
-What is a database? Most generally, it can be any collection of data, but when we are talking about ADQL or SQL:
A database is a collection of one or more named tables.
The following loop prints the names of the columns in the table.
One of the other tables we will use is
gaiadr2.panstarrs1_original_valid
. Use
@@ -636,7 +628,7 @@
You might be wondering how we download these tables. With tables this big, you generally don’t. Instead, you use queries to select only the data you want.
@@ -722,8 +713,7 @@We use a triple-quoted string here so we can include line breaks in the query, which makes @@ -807,8 +797,7 @@
Why is table
repeated three times? The first is the name
of the module, the second is the name of the submodule, and the third is
@@ -863,8 +852,7 @@
Read the documentation of this table and choose a column that looks @@ -879,7 +867,7 @@
For example, we can add radial_velocity : Radial velocity (double, Velocity[km/s] ) - Spectroscopic radial velocity in the solar @@ -912,8 +900,7 @@
launch_job
asks the server to run the job
“synchronously”, which normally means it runs immediately. But
synchronous jobs are limited to 2000 rows. For queries that return more
@@ -1000,8 +987,7 @@
Your results for this query may differ from the Instructor’s. This is
because TOP 3000
returns 3000 results, but those results
@@ -1014,8 +1000,7 @@
The clauses in a query have to be in the right order. Go back and
change the order of the clauses in query2
and run it again.
@@ -1040,7 +1025,7 @@
In this example, the WHERE clause is in the wrong place.
In a WHERE
clause, you can use any of the SQL comparison
operators; here are the most common ones: