dwh 0.6.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec16e1365da69bdc1778ff349775274d8b3a6d85978a9a69be0d6aa0da44d866
4
- data.tar.gz: 4fc4ed0d62f7e657f80779265fec1945317cbdbd127e43c654916f2f0c157f88
3
+ metadata.gz: 1bb280be5e0be9e979828b1e35d8271dbfd35f6926cedcac3c9c134140ca8b30
4
+ data.tar.gz: 407efc9f63ce81f8bb166d970d5ee2d43e8cd31e1fe41f62802362ddc02653e7
5
5
  SHA512:
6
- metadata.gz: '008e23f7a38eae74baffc20f04b14daf6344dc5e3b9ae8616926fa74fe4bab393b4a21134755dcfc289e999ec967c2c5a2baa98044834ce1f415d6d179046ab4'
7
- data.tar.gz: 2febcb2fb010b298d70b2e010dc1d2be942f63bacc4ef7e57eaf63e5fb616c27472037687ad144c706478ce80be66a7445f9479d9e774f78683ca9d6a9dc3732
6
+ metadata.gz: 8773bba3799deb57bd3e3e4738287ded1f0bd8f32fc1225490f346076676f3c962dc58ad43a697e87dc86b41ce10f563af6ac0a1eb3f1ca84836ea9d468cf29d
7
+ data.tar.gz: af66e29a860e89af3c5f8794df099a622d3baa4f7ea5576076c1856399cc91838e3ecdf85ed70c038a8f8061b8da2e65bffc2f49ceca0596ac0457f5b35dfb46
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.1] - 2026-09-30
4
+
5
+ ### Fixed
6
+
7
+ - **BigQuery**: `quote` replaces characters BigQuery rejects in column names (parentheses and similar) so planner-generated aliases such as `Month(Post Date)` execute.
8
+
3
9
  ## [0.6.0] - 2026-09-28
4
10
 
5
11
  ### Added
data/README.md CHANGED
@@ -153,4 +153,4 @@ This project is available as open source under the terms of the MIT License.
153
153
 
154
154
  ## Version
155
155
 
156
- Current version: 0.6.0
156
+ Current version: 0.6.1
@@ -26,6 +26,17 @@ module DWH
26
26
  # normalized type would otherwise be wrong (INTEGER is 64-bit in BigQuery).
27
27
  TYPE_ALIASES = { 'INTEGER' => 'INT64', 'FLOAT' => 'FLOAT64', 'BOOLEAN' => 'BOOL', 'RECORD' => 'STRUCT' }.freeze
28
28
 
29
+ # BigQuery column names, and therefore SELECT aliases, may not contain these
30
+ # characters (https://cloud.google.com/bigquery/docs/schemas#column_names).
31
+ # Dots are left alone so backtick-quoted `dataset.table` paths still work.
32
+ INVALID_NAME_CHARS = %r{[!"$()*,/;?@\[\\\]^{}~]}
33
+
34
+ # (see Functions#quote) Replaces characters BigQuery rejects in a column
35
+ # name so planner-generated aliases like "Month(Post Date)" execute.
36
+ def quote(exp)
37
+ super(exp.to_s.gsub(INVALID_NAME_CHARS, '_'))
38
+ end
39
+
29
40
  # (see Adapter#connection)
30
41
  def connection
31
42
  return @connection if @connection
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.6.0'
4
+ VERSION = '0.6.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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ajo Abraham