-
Notifications
You must be signed in to change notification settings - Fork 0
/
cassandra_init.txt
123 lines (120 loc) · 2.81 KB
/
cassandra_init.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
DROP KEYSPACE IF EXISTS gaia_cluster;
CREATE KEYSPACE gaia_cluster WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
USE gaia_cluster;
CREATE TABLE gaia_source (
solution_id bigint,
source_id bigint,
random_index bigint,
ref_epoch double,
ra double,
ra_error double,
dec double,
dec_error double,
parallax double,
parallax_error double,
pmra double,
pmra_error double,
pmdec double,
pmdec_error double,
ra_dec_corr float,
ra_parallax_corr float,
ra_pmra_corr float,
ra_pmdec_corr float,
dec_parallax_corr float,
dec_pmra_corr float,
dec_pmdec_corr float,
parallax_pmra_corr float,
parallax_pmdec_corr float,
pmra_pmdec_corr float,
astrometric_n_obs_al int,
astrometric_n_obs_ac int,
astrometric_n_good_obs_al int,
astrometric_n_good_obs_ac int,
astrometric_n_bad_obs_al int,
astrometric_n_bad_obs_ac int,
astrometric_delta_q float,
astrometric_excess_noise double,
astrometric_excess_noise_sig double,
astrometric_primary_flag boolean,
astrometric_relegation_factor float,
astrometric_weight_al float,
astrometric_weight_ac float,
astrometric_priors_used int,
matched_observations int,
duplicated_source boolean,
scan_direction_strength_k1 float ,
scan_direction_strength_k2 float ,
scan_direction_strength_k3 float ,
scan_direction_strength_k4 float ,
scan_direction_mean_k1 float ,
scan_direction_mean_k2 float ,
scan_direction_mean_k3 float ,
scan_direction_mean_k4 float ,
phot_g_n_obs int,
phot_g_mean_flux double,
phot_g_mean_flux_error double,
phot_g_mean_mag double,
phot_variable_flag varchar,
l double,
b double,
ecl_lon double,
ecl_lat double,
PRIMARY KEY (solution_id, source_id)
);
COPY gaia_source (
solution_id,
source_id,
random_index,
ref_epoch,
ra,ra_error,
dec,dec_error,
parallax,
parallax_error,
pmra,pmra_error,
pmdec,pmdec_error,
ra_dec_corr,
ra_parallax_corr,
ra_pmra_corr,
ra_pmdec_corr,
dec_parallax_corr,
dec_pmra_corr,
dec_pmdec_corr,
parallax_pmra_corr,
parallax_pmdec_corr,
pmra_pmdec_corr,
astrometric_n_obs_al,
astrometric_n_obs_ac,
astrometric_n_good_obs_al,
astrometric_n_good_obs_ac,
astrometric_n_bad_obs_al,
astrometric_n_bad_obs_ac,
astrometric_delta_q,
astrometric_excess_noise,
astrometric_excess_noise_sig,
astrometric_primary_flag,
astrometric_relegation_factor,
astrometric_weight_al,
astrometric_weight_ac,
astrometric_priors_used,
matched_observations,
duplicated_source,
scan_direction_strength_k1,
scan_direction_strength_k2,
scan_direction_strength_k3,
scan_direction_strength_k4,
scan_direction_mean_k1,
scan_direction_mean_k2,
scan_direction_mean_k3,
scan_direction_mean_k4,
phot_g_n_obs,
phot_g_mean_flux,
phot_g_mean_flux_error,
phot_g_mean_mag,
phot_variable_flag,
l,
b,
ecl_lon,
ecl_lat
)
FROM ''<FILEPATH>" -- e.g. C:\Data\GaiaData\GaiaSource_000-000-000.csv
WITH HEADER = true;