dwh 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/Rakefile +1 -1
  4. data/docs/DWH/Adapters/Adapter.html +33 -27
  5. data/docs/DWH/Adapters/Athena.html +25 -21
  6. data/docs/DWH/Adapters/Boolean.html +1 -1
  7. data/docs/DWH/Adapters/Druid.html +18 -12
  8. data/docs/DWH/Adapters/DuckDb.html +29 -27
  9. data/docs/DWH/Adapters/MySql.html +25 -19
  10. data/docs/DWH/Adapters/OpenAuthorizable/ClassMethods.html +3 -6
  11. data/docs/DWH/Adapters/OpenAuthorizable.html +5 -10
  12. data/docs/DWH/Adapters/Postgres.html +27 -23
  13. data/docs/DWH/Adapters/Snowflake.html +39 -24
  14. data/docs/DWH/Adapters/SqlServer.html +27 -25
  15. data/docs/DWH/Adapters/Trino.html +30 -30
  16. data/docs/DWH/Adapters.html +1 -1
  17. data/docs/DWH/AuthenticationError.html +1 -1
  18. data/docs/DWH/Behaviors.html +6 -11
  19. data/docs/DWH/Capabilities.html +10 -26
  20. data/docs/DWH/Column.html +7 -15
  21. data/docs/DWH/ConfigError.html +1 -1
  22. data/docs/DWH/ConnectionError.html +1 -1
  23. data/docs/DWH/DWHError.html +1 -1
  24. data/docs/DWH/ExecutionError.html +1 -1
  25. data/docs/DWH/Factory.html +1 -1
  26. data/docs/DWH/Functions/Arrays.html +8 -8
  27. data/docs/DWH/Functions/Dates.html +5 -7
  28. data/docs/DWH/Functions/ExtractDatePart.html +13 -25
  29. data/docs/DWH/Functions/Nulls.html +3 -3
  30. data/docs/DWH/Functions.html +6 -9
  31. data/docs/DWH/Logger.html +3 -5
  32. data/docs/DWH/OAuthError.html +1 -1
  33. data/docs/DWH/Settings.html +6 -9
  34. data/docs/DWH/StreamingStats.html +2 -3
  35. data/docs/DWH/Table.html +14 -26
  36. data/docs/DWH/TableStats.html +1 -1
  37. data/docs/DWH/TokenExpiredError.html +1 -1
  38. data/docs/DWH/UnsupportedCapability.html +1 -1
  39. data/docs/DWH.html +1 -1
  40. data/docs/_index.html +1 -1
  41. data/docs/file.README.html +43 -48
  42. data/docs/file.adapters.html +318 -343
  43. data/docs/file.creating-adapters.html +347 -357
  44. data/docs/file.getting-started.html +143 -151
  45. data/docs/file.usage.html +257 -278
  46. data/docs/index.html +43 -48
  47. data/docs/top-level-namespace.html +1 -1
  48. data/lib/dwh/adapters.rb +2 -2
  49. data/lib/dwh/version.rb +1 -1
  50. metadata +2 -2
data/docs/index.html CHANGED
@@ -57,15 +57,14 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'>
61
- <p><a href="https://github.com/stratasite/dwh/actions"><img src="https://github.com/stratasite/dwh/workflows/Ruby/badge.svg" alt="Ruby" /></a></p>
60
+ <div id="content"><div id='filecontents'><p><a href="https://github.com/stratasite/dwh/actions"><img src="https://github.com/stratasite/dwh/workflows/Ruby/badge.svg" alt="Ruby"></a></p>
62
61
 
63
- <h1 id="dwh---data-warehouse-adapter-library">DWH - Data Warehouse Adapter Library</h1>
62
+ <h1 id="dwh-data-warehouse-adapter-library">DWH - Data Warehouse Adapter Library</h1>
64
63
 
65
64
  <p>A light weight library to connect, introspect, and query popular databases over a unified interface. This gem is intended for analtyical workloads. The library also provides database specific translations for common functions like <code>date_trunc</code>, <code>date_add</code> etc. The function tranlation is not comprehensive. But, it does provides good coverage for date handling, and some array handling as well.</p>
66
65
 
67
66
  <blockquote>
68
- <p>[!NOTE]
67
+ <p>[!NOTE]
69
68
  <strong>This is not an ORM</strong> nor will it cast types to ruby unless the underlying client does it out of the box. The goal here is to create an Architecture where new databases can be onboarded quickly.</p>
70
69
  </blockquote>
71
70
 
@@ -78,57 +77,55 @@
78
77
  <h2 id="features">Features</h2>
79
78
 
80
79
  <ul>
81
- <li><strong>Unified Interface</strong>: Connect to multiple database types using the same API</li>
82
- <li><strong>SQL Function Translation</strong>: Automatically translates common SQL functions to database-specific syntax</li>
83
- <li><strong>Connection Pooling</strong>: Built-in connection pool management for high-performance applications</li>
84
- <li><strong>Rich Metadata</strong>: Extract table schemas, column information, and statistics</li>
80
+ <li><strong>Unified Interface</strong>: Connect to multiple database types using the same API</li>
81
+ <li><strong>SQL Function Translation</strong>: Automatically translates common SQL functions to database-specific syntax</li>
82
+ <li><strong>Connection Pooling</strong>: Built-in connection pool management for high-performance applications</li>
83
+ <li><strong>Rich Metadata</strong>: Extract table schemas, column information, and statistics</li>
85
84
  </ul>
86
85
 
87
86
  <h2 id="supported-databases">Supported Databases</h2>
88
87
 
89
88
  <ul>
90
- <li><strong>Snowflake</strong> - High performance cloud warehouse</li>
91
- <li><strong>Trino</strong> (formerly Presto) - Distributed SQL query engine</li>
92
- <li><strong>AWS Athena</strong> - AWS big data warehouse</li>
93
- <li><strong>Apache Druid</strong> - Real-time analytics database</li>
94
- <li><strong>DuckDB</strong> - In-process analytical database</li>
95
- <li><strong>PostgreSQL</strong> - Full-featured RDBMS with advanced SQL support</li>
96
- <li><strong>MySQL</strong> - Popular open-source database</li>
97
- <li><strong>SQL Server</strong> - Microsofts enterprise database</li>
89
+ <li><strong>Snowflake</strong> - High performance cloud warehouse</li>
90
+ <li><strong>Trino</strong> (formerly Presto) - Distributed SQL query engine</li>
91
+ <li><strong>AWS Athena</strong> - AWS big data warehouse</li>
92
+ <li><strong>Apache Druid</strong> - Real-time analytics database</li>
93
+ <li><strong>DuckDB</strong> - In-process analytical database</li>
94
+ <li><strong>PostgreSQL</strong> - Full-featured RDBMS with advanced SQL support</li>
95
+ <li><strong>MySQL</strong> - Popular open-source database</li>
96
+ <li><strong>SQL Server</strong> - Microsoft&#39;s enterprise database</li>
98
97
  </ul>
99
98
 
100
99
  <h2 id="integrations-coming-soon">Integrations Coming Soon</h2>
101
100
 
102
101
  <ul>
103
- <li><strong>Redshift</strong> - AWS data warehouse platform</li>
104
- <li><strong>ClickHouse</strong> - High performance analytical db</li>
105
- <li><strong>Databricks</strong> - Big data compute engine</li>
106
- <li><strong>MotherDuck</strong> - Hosted DuckDB service</li>
102
+ <li><strong>Redshift</strong> - AWS data warehouse platform</li>
103
+ <li><strong>ClickHouse</strong> - High performance analytical db</li>
104
+ <li><strong>Databricks</strong> - Big data compute engine</li>
105
+ <li><strong>MotherDuck</strong> - Hosted DuckDB service</li>
107
106
  </ul>
108
107
 
109
108
  <h2 id="quick-start">Quick Start</h2>
110
109
 
111
110
  <p>Install it yourself as:</p>
112
111
 
113
- <p><code>bash
114
- gem install dwh
115
- </code></p>
112
+ <pre class="code bash"><code class="bash">gem install dwh
113
+ </code></pre>
116
114
 
117
115
  <h3 id="connect-and-execute-a-basic-query">Connect and Execute a Basic Query</h3>
118
116
 
119
- <p>```ruby
120
- require ‘dwh’</p>
117
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dwh</span><span class='tstring_end'>&#39;</span></span>
121
118
 
122
- <h1 id="connect-to-druid">Connect to Druid</h1>
123
- <p>druid = DWH.create(:druid, {
124
- host: localhost’,
125
- port: 8080,
126
- protocol: http
127
- })</p>
119
+ <span class='comment'># Connect to Druid
120
+ </span><span class='id identifier rubyid_druid'>druid</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DWH.html" title="DWH (module)">DWH</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="DWH/Factory.html#create-instance_method" title="DWH::Factory#create (method)">create</a></span></span><span class='lparen'>(</span><span class='symbol'>:druid</span><span class='comma'>,</span> <span class='lbrace'>{</span>
121
+ <span class='label'>host:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>localhost</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
122
+ <span class='label'>port:</span> <span class='int'>8080</span><span class='comma'>,</span>
123
+ <span class='label'>protocol:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>http</span><span class='tstring_end'>&#39;</span></span>
124
+ <span class='rbrace'>}</span><span class='rparen'>)</span>
128
125
 
129
- <h1 id="basic-query-execution">basic query execution</h1>
130
- <p>results = druid.execute(SELECT * FROM web_sales”, format: :csv)
131
- ```</p>
126
+ <span class='comment'># basic query execution
127
+ </span><span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_druid'>druid</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>SELECT * FROM web_sales</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>format:</span> <span class='symbol'>:csv</span><span class='rparen'>)</span>
128
+ </code></pre>
132
129
 
133
130
  <h2 id="core-api">Core API</h2>
134
131
 
@@ -152,10 +149,11 @@ require ‘dwh’</p>
152
149
  <h2 id="tutorials-and-guides">Tutorials and Guides</h2>
153
150
 
154
151
  <ul>
155
- <li><a href="/docs/guides/getting-started.md">Getting Started</a></li>
156
- <li><a href="/docs/guides/adapters.md">Adapter Configuration</a></li>
157
- <li><a href="/docs/guides/creating-adapters.md">Creating an Adapter</a></li>
158
- <li><a href="https://rubydoc.info/github/stratasite/dwh.git">API</a></li>
152
+ <li><a href="https://strata.site/dwh/file.getting-started.html">Getting Started</a></li>
153
+ <li><a href="https://strata.site/dwh/file.adapters.html">Adapter Configuration</a></li>
154
+ <li><a href="https://strata.site/dwh/file.creating-adapters.html">Creating an Adapter</a></li>
155
+ <li><a href="https://strata.site/dwh/file.usage.html">Advanced Usage</a></li>
156
+ <li><a href="https://strata.site/dwh/DWH.html">API</a></li>
159
157
  </ul>
160
158
 
161
159
  <h2 id="testing">Testing</h2>
@@ -164,21 +162,18 @@ require ‘dwh’</p>
164
162
 
165
163
  <p>Run Unit Tests:</p>
166
164
 
167
- <p><code>bash
168
- bundle exec rake test:unit
169
- </code></p>
165
+ <pre class="code bash"><code class="bash">bundle exec rake test:unit
166
+ </code></pre>
170
167
 
171
168
  <p>Run tests on RDBMS dbs:</p>
172
169
 
173
- <p><code>bash
174
- bundle exec rake test:system:rdbms
175
- </code></p>
170
+ <pre class="code bash"><code class="bash">bundle exec rake test:system:rdbms
171
+ </code></pre>
176
172
 
177
173
  <p>Run tests on druid:</p>
178
174
 
179
- <p><code>bash
180
- bundle exec rake test:system:druid
181
- </code></p>
175
+ <pre class="code bash"><code class="bash">bundle exec rake test:system:druid
176
+ </code></pre>
182
177
 
183
178
  <h2 id="development">Development</h2>
184
179
 
@@ -200,7 +195,7 @@ bundle exec rake test:system:druid
200
195
  </div></div>
201
196
 
202
197
  <div id="footer">
203
- Generated on Fri Aug 22 08:31:21 2025 by
198
+ Generated on Mon Aug 25 10:59:27 2025 by
204
199
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
205
200
  0.9.37 (ruby-3.4.4).
206
201
  </div>
@@ -100,7 +100,7 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Fri Aug 22 08:31:21 2025 by
103
+ Generated on Mon Aug 25 10:59:27 2025 by
104
104
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
105
  0.9.37 (ruby-3.4.4).
106
106
  </div>
data/lib/dwh/adapters.rb CHANGED
@@ -335,7 +335,7 @@ module DWH
335
335
 
336
336
  # Check for missing required parameters
337
337
  missing_params = definitions.select do |name, options|
338
- options[:required] && !config.key?(name) && options[:default].nil?
338
+ options[:required] && !config[name] && options[:default].nil?
339
339
  end
340
340
 
341
341
  if missing_params.any?
@@ -351,7 +351,7 @@ module DWH
351
351
 
352
352
  raise ConfigError, "Invalid value. Only allowed: #{opts[:allowed]}." if opts[:allowed].any? && !opts[:allowed].include?(config[name])
353
353
 
354
- config[name] = opts[:default] if opts[:default] && !config.key?(name)
354
+ config[name] = opts[:default] if opts[:default] && !config[name]
355
355
 
356
356
  if opts[:required] && !config[name].is_a?(opts[:type]) && !opts[:type].is_a?(Boolean)
357
357
  raise ConfigError, "#{name} should be a #{opts[:type]}. Got #{opts[name.to_sym].class.name}"
data/lib/dwh/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DWH
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ajo Abraham
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.6.7
228
+ rubygems_version: 3.7.1
229
229
  specification_version: 4
230
230
  summary: Data warehouse adapters for interacting with popular data warehouses.
231
231
  test_files: []