Skip to content

Instantly share code, notes, and snippets.

@weargoggles
Created December 9, 2015 11:59
Show Gist options
  • Save weargoggles/da537305078b7161018a to your computer and use it in GitHub Desktop.
Save weargoggles/da537305078b7161018a to your computer and use it in GitHub Desktop.
csv from postgres
[pete@cassandra 11:58:11]
[/home/pete/]$ psql minor_planets -c 'copy (select * from orbits limit 100) to stdout csv header' | head
designation_raw,magnitude,slope,epoch_raw,mean_anomaly,argument_of_perihelion,longitude_ascending,inclination,eccentricity,mean_daily_motion,semimajor_axis,uncertainty,reference,observations,oppositions,year_first_obs_or_arc_length,year_last_obs_or_days,residual,coarse_perturbers,precise_perturbers,computer,readable
00001 ,3.34,0.12,K14C9,95.98921,72.52200,80.32927,10.59338,0.0758228,0.21407760,2.7675059,0,MPO309141,6532,107,1802,2014,0.60,M-v,30h,MPCLINUX , (1) Ceres
00002 ,4.13,0.11,K14C9,78.22871,309.93032,173.09624,34.84100,0.2312737,0.21360273,2.7716062,0,MPO319080,7712,103,1821,2014,0.58,M-v,28h,MPCLINUX , (2) Pallas
00003 ,5.33,0.32,K14C9,33.07717,248.40995,169.87117,12.98166,0.2554482,0.22582205,2.6707003,0,MPO319080,6660,101,1821,2014,0.60,M-v,38h,MPCLINUX , (3) Juno
00004 ,3.20,0.32,K14C9,20.86389,151.19843,103.85141,7.14043,0.0887401,0.27154465,2.3617933,0,MPO309141,6751,96,1821,2014,0.60,M-p,18h,MPCLINUX , (4) Vesta
00005 ,6.85,0.15,K14C9,260.18955,358.92895,141.59557,5.36852,0.1911355,0.23869295,2.5738091,0,MPO319080,2083,73,1845,2014,0.58,M-v,38h,MPCLINUX , (5) Astraea
00006 ,5.71,0.24,K14C9,29.21427,239.40791,138.70362,14.74817,0.2014490,0.26094084,2.4253514,0,MPO309141,5430,86,1848,2014,0.54,M-v,38h,MPCLINUX , (6) Hebe
00007 ,5.51,0.15,K14C9,72.14869,145.46124,259.62073,5.52270,0.2307945,0.26731189,2.3866599,0,MPO319080,4852,82,1848,2014,0.58,M-v,38h,MPCLINUX , (7) Iris
00008 ,6.49,0.28,K14C9,71.83875,285.46692,110.92229,5.88777,0.1563371,0.30164107,2.2019582,0,MPO319080,2167,83,1847,2014,0.66,M-v,38h,MPCLINUX , (8) Flora
00009 ,6.28,0.17,K14C9,209.68566,5.86880,68.94474,5.57444,0.1222902,0.26734971,2.3864348,0,MPO305425,2311,73,1849,2014,0.63,M-v,38h,MPCLINUX , (9) Metis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment