To begin the data extraction, we downloaded the tgas_source data files at the Gaia Archive. The fields in these files are specified in Section 7.5 of the Gaia DR1 documentation. Of direct interest to us are Fields 5 and 7, labeled "Right ascension" and "Declination". These are described as follows in Section 1.1 of the documentation.
The two values place the star at a point on a sphere centered at Earth, which is just what we need. (Clear explanations are given on the Right ascension and Declination Wikipedia pages.)
Now for the distance estimates. In their research paper Estimating distances from parallaxes. III. Distances of two million stars in the Gaia DR1 catalogue, Astraatmadija and Bailer-Jones write the following.
We therefore selected the estimates obtained with the Milky Way prior. We grabbed these from the Astraatmadija and Bailer-Jones site, downloading the raw data file tgas_dist_all_v01.csv.gz. Their README directs us to the 21st field (bytes 302-315), labeled "r50[pc]" with the description "50th percentile (i.e. the median) of the posterior, using Milky Way Prior". This is the value we used to place each star in 3-dimensional Euclidean space.
We don't make any claims about the data set, other than it gives an exciting large-scale challenge for the traveling salesman problem.