Skip to content

Commit

Permalink
Add walrusiq qtags
Browse files Browse the repository at this point in the history
  • Loading branch information
scgkiran committed Nov 21, 2024
1 parent 2b13d15 commit 8cbd795
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
10 changes: 10 additions & 0 deletions go/pkg/qtag/declarations/walrusiq.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: walrusiq
site: "https://sundeck.io"
identifier:
fields:
app: walrusiq
fields:
- name: app
type: APPLICATION
- name: suggested_warehouse_size
type: DIMENSION
42 changes: 42 additions & 0 deletions go/pkg/qtag/generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,3 +511,45 @@ func (c *Sundeck) AddAuto_routing_warehouse_pool(value any) {
func (c *Sundeck) AddQuery_id(value any) {
c.values["query_id"] = value
}

type Walrusiq struct {
Builder
name string
identifier map[string]any
values map[string]any
}

func NewWalrusiq() *Walrusiq {
x := Walrusiq{}
x.init()
return &x
}

func (c *Walrusiq) init() {
c.name = "walrusiq"
c.identifier = make(map[string]any)
json.Unmarshal([]byte("{\"fields\":{\"app\":\"walrusiq\"}}"), &c.identifier)
c.values = make(map[string]any)
}

func (c *Walrusiq) Format() (string, error) {
return format(c.name, c.identifier, c.values)
}

func (c *Walrusiq) UnknownValue(name string, value any) {
c.values[name] = value
}

func (c *Walrusiq) Merge(other *Walrusiq) {
for k, v := range other.values {
c.values[k] = v
}
}

func (c *Walrusiq) AddApp(value any) {
c.values["app"] = value
}

func (c *Walrusiq) AddSuggested_warehouse_size(value any) {
c.values["suggested_warehouse_size"] = value
}
13 changes: 13 additions & 0 deletions tests/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,16 @@
key: pulseId
type: DIMENSION
value: null
- name: test walrusiq tags
query: |
select 1
-- {"app": "walrusiq", "suggested_warehouse_size": "Small"}
outcome:
- source: walrusiq
key: app
value: walrusiq
type: APPLICATION
- source: walrusiq
key: suggested_warehouse_size
value: Small
type: DIMENSION

0 comments on commit 8cbd795

Please sign in to comment.