infobright-loader 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +19 -0
- data/LICENSE-2.0.txt +202 -0
- data/README.md +232 -0
- data/Rakefile +2 -0
- data/bin/infobright-loader +45 -0
- data/control-file/template.yml +23 -0
- data/infobright-loader.gemspec +35 -0
- data/lib/infobright-loader.rb +5 -0
- data/lib/infobright-loader/cli/config.rb +204 -0
- data/lib/infobright-loader/cli/loader.rb +66 -0
- data/lib/infobright-loader/db.rb +90 -0
- data/lib/infobright-loader/loader.rb +175 -0
- data/lib/infobright-loader/version.rb +4 -0
- data/tests/manual/bad-files/.gitignore +1 -0
- data/tests/manual/bad-files/control-file-raw.yml +50 -0
- data/tests/manual/bad-files/data/b/b_1.txt +6 -0
- data/tests/manual/bad-files/data/b/b_2.txt +6 -0
- data/tests/manual/bad-files/data/b/b_3.txt +6 -0
- data/tests/manual/bad-files/data/b/b_4.txt +6 -0
- data/tests/manual/bad-files/data/b/b_5.txt +6 -0
- data/tests/manual/bad-files/data/b/b_6.txt +6 -0
- data/tests/manual/bad-files/data/c/c_1.txt +6 -0
- data/tests/manual/bad-files/data/c/c_2.txt +6 -0
- data/tests/manual/bad-files/data/c/c_3.txt +6 -0
- data/tests/manual/bad-files/data/c/c_4.txt +6 -0
- data/tests/manual/bad-files/data/c/c_5.txt +6 -0
- data/tests/manual/bad-files/data/c/c_6.txt +6 -0
- data/tests/manual/bad-files/data/d/d_1.txt +6 -0
- data/tests/manual/bad-files/data/d/d_2.txt +6 -0
- data/tests/manual/bad-files/data/d/d_3.txt +6 -0
- data/tests/manual/bad-files/data/d/d_4.txt +6 -0
- data/tests/manual/bad-files/data/d/d_5.txt +6 -0
- data/tests/manual/bad-files/data/d/d_6.txt +6 -0
- data/tests/manual/bad-files/data/e/e_1.txt +6 -0
- data/tests/manual/bad-files/data/e/e_2.txt +6 -0
- data/tests/manual/bad-files/data/e/e_3.txt +6 -0
- data/tests/manual/bad-files/data/e/e_4.txt +6 -0
- data/tests/manual/bad-files/data/e/e_5.txt +6 -0
- data/tests/manual/bad-files/data/e/e_6.txt +6 -0
- data/tests/manual/bad-files/data/f/f_1.txt +6 -0
- data/tests/manual/bad-files/data/f/f_2.txt +6 -0
- data/tests/manual/bad-files/data/f/f_3.txt +6 -0
- data/tests/manual/bad-files/data/f/f_4.txt +6 -0
- data/tests/manual/bad-files/data/f/f_5.txt +6 -0
- data/tests/manual/bad-files/data/f/f_6.txt +6 -0
- data/tests/manual/bad-files/run_test.sh +40 -0
- data/tests/manual/bad-files/setup.sql +8 -0
- data/tests/manual/bad-files/verify.sql +10 -0
- data/tests/manual/control-file/.gitignore +1 -0
- data/tests/manual/control-file/control-file-raw.yml +50 -0
- data/tests/manual/control-file/data/b/b_1.txt +6 -0
- data/tests/manual/control-file/data/b/b_2.txt +6 -0
- data/tests/manual/control-file/data/b/b_3.txt +6 -0
- data/tests/manual/control-file/data/b/b_4.txt +6 -0
- data/tests/manual/control-file/data/b/b_5.txt +6 -0
- data/tests/manual/control-file/data/b/b_6.txt +6 -0
- data/tests/manual/control-file/data/c/c_1.txt +6 -0
- data/tests/manual/control-file/data/c/c_2.txt +6 -0
- data/tests/manual/control-file/data/c/c_3.txt +6 -0
- data/tests/manual/control-file/data/c/c_4.txt +6 -0
- data/tests/manual/control-file/data/c/c_5.txt +6 -0
- data/tests/manual/control-file/data/c/c_6.txt +6 -0
- data/tests/manual/control-file/data/d/d_1.txt +6 -0
- data/tests/manual/control-file/data/d/d_2.txt +6 -0
- data/tests/manual/control-file/data/d/d_3.txt +6 -0
- data/tests/manual/control-file/data/d/d_4.txt +6 -0
- data/tests/manual/control-file/data/d/d_5.txt +6 -0
- data/tests/manual/control-file/data/d/d_6.txt +6 -0
- data/tests/manual/control-file/data/e/e_1.txt +6 -0
- data/tests/manual/control-file/data/e/e_2.txt +6 -0
- data/tests/manual/control-file/data/e/e_3.txt +6 -0
- data/tests/manual/control-file/data/e/e_4.txt +6 -0
- data/tests/manual/control-file/data/e/e_5.txt +6 -0
- data/tests/manual/control-file/data/e/e_6.txt +6 -0
- data/tests/manual/control-file/data/f/f_1.txt +6 -0
- data/tests/manual/control-file/data/f/f_2.txt +6 -0
- data/tests/manual/control-file/data/f/f_3.txt +6 -0
- data/tests/manual/control-file/data/f/f_4.txt +6 -0
- data/tests/manual/control-file/data/f/f_5.txt +6 -0
- data/tests/manual/control-file/data/f/f_6.txt +6 -0
- data/tests/manual/control-file/run_test.sh +40 -0
- data/tests/manual/control-file/setup.sql +8 -0
- data/tests/manual/control-file/verify.sql +10 -0
- data/tests/manual/folder/data/a/a_1.txt +6 -0
- data/tests/manual/folder/data/a/a_2.txt +6 -0
- data/tests/manual/folder/data/a/a_3.txt +6 -0
- data/tests/manual/folder/data/a/a_4.txt +6 -0
- data/tests/manual/folder/data/a/a_5.txt +6 -0
- data/tests/manual/folder/data/a/a_6.txt +6 -0
- data/tests/manual/folder/run_test.sh +37 -0
- data/tests/manual/folder/setup.sql +4 -0
- data/tests/manual/folder/verify.sql +2 -0
- metadata +158 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
# Copyright (c) 2012 SnowPlow Analytics Ltd. All rights reserved.
|
3
|
+
#
|
4
|
+
# This program is licensed to you under the Apache License Version 2.0,
|
5
|
+
# and you may not use this file except in compliance with the Apache License Version 2.0.
|
6
|
+
# You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
|
7
|
+
#
|
8
|
+
# Unless required by applicable law or agreed to in writing,
|
9
|
+
# software distributed under the Apache License Version 2.0 is distributed on an
|
10
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
11
|
+
# See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
|
12
|
+
|
13
|
+
# Author:: Alex Dean (mailto:support@snowplowanalytics.com)
|
14
|
+
# Copyright:: Copyright (c) 2012 SnowPlow Analytics Ltd
|
15
|
+
# License:: Apache License Version 2.0
|
16
|
+
|
17
|
+
# input parameters
|
18
|
+
if [ $# != 2 ]; then
|
19
|
+
echo; echo 'syntax: '$0' <username> <password>'; echo
|
20
|
+
exit 1
|
21
|
+
else
|
22
|
+
# assign parameters
|
23
|
+
USERNAME=$1
|
24
|
+
PASSWORD=$2
|
25
|
+
fi
|
26
|
+
|
27
|
+
echo "Running folder-based test..."
|
28
|
+
SQL=`locate mysql-ib`
|
29
|
+
|
30
|
+
echo "Setting up Infobright"
|
31
|
+
cat setup.sql | ${SQL} -u ${USERNAME} --password=${PASSWORD}
|
32
|
+
|
33
|
+
echo "Running Infobright Ruby Loader in folder mode"
|
34
|
+
bundle exec infobright-loader -d irl_tests -e \" -u ${USERNAME} -p ${PASSWORD} -t a -f data/a
|
35
|
+
|
36
|
+
echo "Verifying the load into Infobright - please visually inspect:"
|
37
|
+
cat verify.sql | ${SQL} -u ${USERNAME} --password=${PASSWORD}
|
metadata
ADDED
@@ -0,0 +1,158 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: infobright-loader
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Alex Dean <support@snowplowanalytics.com>
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-10-22 00:00:00 Z
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Loads data files into Infobright
|
22
|
+
email:
|
23
|
+
- support@snowplowanalytics.com
|
24
|
+
executables:
|
25
|
+
- infobright-loader
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- .gitignore
|
32
|
+
- Gemfile
|
33
|
+
- LICENSE-2.0.txt
|
34
|
+
- README.md
|
35
|
+
- Rakefile
|
36
|
+
- bin/infobright-loader
|
37
|
+
- control-file/template.yml
|
38
|
+
- infobright-loader.gemspec
|
39
|
+
- lib/infobright-loader.rb
|
40
|
+
- lib/infobright-loader/cli/config.rb
|
41
|
+
- lib/infobright-loader/cli/loader.rb
|
42
|
+
- lib/infobright-loader/db.rb
|
43
|
+
- lib/infobright-loader/loader.rb
|
44
|
+
- lib/infobright-loader/version.rb
|
45
|
+
- tests/manual/bad-files/.gitignore
|
46
|
+
- tests/manual/bad-files/control-file-raw.yml
|
47
|
+
- tests/manual/bad-files/data/b/b_1.txt
|
48
|
+
- tests/manual/bad-files/data/b/b_2.txt
|
49
|
+
- tests/manual/bad-files/data/b/b_3.txt
|
50
|
+
- tests/manual/bad-files/data/b/b_4.txt
|
51
|
+
- tests/manual/bad-files/data/b/b_5.txt
|
52
|
+
- tests/manual/bad-files/data/b/b_6.txt
|
53
|
+
- tests/manual/bad-files/data/c/c_1.txt
|
54
|
+
- tests/manual/bad-files/data/c/c_2.txt
|
55
|
+
- tests/manual/bad-files/data/c/c_3.txt
|
56
|
+
- tests/manual/bad-files/data/c/c_4.txt
|
57
|
+
- tests/manual/bad-files/data/c/c_5.txt
|
58
|
+
- tests/manual/bad-files/data/c/c_6.txt
|
59
|
+
- tests/manual/bad-files/data/d/d_1.txt
|
60
|
+
- tests/manual/bad-files/data/d/d_2.txt
|
61
|
+
- tests/manual/bad-files/data/d/d_3.txt
|
62
|
+
- tests/manual/bad-files/data/d/d_4.txt
|
63
|
+
- tests/manual/bad-files/data/d/d_5.txt
|
64
|
+
- tests/manual/bad-files/data/d/d_6.txt
|
65
|
+
- tests/manual/bad-files/data/e/e_1.txt
|
66
|
+
- tests/manual/bad-files/data/e/e_2.txt
|
67
|
+
- tests/manual/bad-files/data/e/e_3.txt
|
68
|
+
- tests/manual/bad-files/data/e/e_4.txt
|
69
|
+
- tests/manual/bad-files/data/e/e_5.txt
|
70
|
+
- tests/manual/bad-files/data/e/e_6.txt
|
71
|
+
- tests/manual/bad-files/data/f/f_1.txt
|
72
|
+
- tests/manual/bad-files/data/f/f_2.txt
|
73
|
+
- tests/manual/bad-files/data/f/f_3.txt
|
74
|
+
- tests/manual/bad-files/data/f/f_4.txt
|
75
|
+
- tests/manual/bad-files/data/f/f_5.txt
|
76
|
+
- tests/manual/bad-files/data/f/f_6.txt
|
77
|
+
- tests/manual/bad-files/run_test.sh
|
78
|
+
- tests/manual/bad-files/setup.sql
|
79
|
+
- tests/manual/bad-files/verify.sql
|
80
|
+
- tests/manual/control-file/.gitignore
|
81
|
+
- tests/manual/control-file/control-file-raw.yml
|
82
|
+
- tests/manual/control-file/data/b/b_1.txt
|
83
|
+
- tests/manual/control-file/data/b/b_2.txt
|
84
|
+
- tests/manual/control-file/data/b/b_3.txt
|
85
|
+
- tests/manual/control-file/data/b/b_4.txt
|
86
|
+
- tests/manual/control-file/data/b/b_5.txt
|
87
|
+
- tests/manual/control-file/data/b/b_6.txt
|
88
|
+
- tests/manual/control-file/data/c/c_1.txt
|
89
|
+
- tests/manual/control-file/data/c/c_2.txt
|
90
|
+
- tests/manual/control-file/data/c/c_3.txt
|
91
|
+
- tests/manual/control-file/data/c/c_4.txt
|
92
|
+
- tests/manual/control-file/data/c/c_5.txt
|
93
|
+
- tests/manual/control-file/data/c/c_6.txt
|
94
|
+
- tests/manual/control-file/data/d/d_1.txt
|
95
|
+
- tests/manual/control-file/data/d/d_2.txt
|
96
|
+
- tests/manual/control-file/data/d/d_3.txt
|
97
|
+
- tests/manual/control-file/data/d/d_4.txt
|
98
|
+
- tests/manual/control-file/data/d/d_5.txt
|
99
|
+
- tests/manual/control-file/data/d/d_6.txt
|
100
|
+
- tests/manual/control-file/data/e/e_1.txt
|
101
|
+
- tests/manual/control-file/data/e/e_2.txt
|
102
|
+
- tests/manual/control-file/data/e/e_3.txt
|
103
|
+
- tests/manual/control-file/data/e/e_4.txt
|
104
|
+
- tests/manual/control-file/data/e/e_5.txt
|
105
|
+
- tests/manual/control-file/data/e/e_6.txt
|
106
|
+
- tests/manual/control-file/data/f/f_1.txt
|
107
|
+
- tests/manual/control-file/data/f/f_2.txt
|
108
|
+
- tests/manual/control-file/data/f/f_3.txt
|
109
|
+
- tests/manual/control-file/data/f/f_4.txt
|
110
|
+
- tests/manual/control-file/data/f/f_5.txt
|
111
|
+
- tests/manual/control-file/data/f/f_6.txt
|
112
|
+
- tests/manual/control-file/run_test.sh
|
113
|
+
- tests/manual/control-file/setup.sql
|
114
|
+
- tests/manual/control-file/verify.sql
|
115
|
+
- tests/manual/folder/data/a/a_1.txt
|
116
|
+
- tests/manual/folder/data/a/a_2.txt
|
117
|
+
- tests/manual/folder/data/a/a_3.txt
|
118
|
+
- tests/manual/folder/data/a/a_4.txt
|
119
|
+
- tests/manual/folder/data/a/a_5.txt
|
120
|
+
- tests/manual/folder/data/a/a_6.txt
|
121
|
+
- tests/manual/folder/run_test.sh
|
122
|
+
- tests/manual/folder/setup.sql
|
123
|
+
- tests/manual/folder/verify.sql
|
124
|
+
homepage: http://snowplowanalytics.com
|
125
|
+
licenses: []
|
126
|
+
|
127
|
+
post_install_message:
|
128
|
+
rdoc_options: []
|
129
|
+
|
130
|
+
require_paths:
|
131
|
+
- lib
|
132
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
hash: 3
|
138
|
+
segments:
|
139
|
+
- 0
|
140
|
+
version: "0"
|
141
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
hash: 3
|
147
|
+
segments:
|
148
|
+
- 0
|
149
|
+
version: "0"
|
150
|
+
requirements: []
|
151
|
+
|
152
|
+
rubyforge_project:
|
153
|
+
rubygems_version: 1.8.24
|
154
|
+
signing_key:
|
155
|
+
specification_version: 3
|
156
|
+
summary: Infobright Ruby Loader (IRL) is a data loader for Infobright Community Edition (ICE) and Enterprise Edition (IEE), built as a Ruby gem. Inspired by ParaFlex (the bash equivalent)
|
157
|
+
test_files: []
|
158
|
+
|