---
# System prepended metadata

title: Talk slides template
tags: [' Talk', Templates]

---

---
title: Talk slides template
tags: Templates, Talk
description: View the slide with "Slide Mode".
---

# no bt in dbt anymore!

---

![](https://i.imgur.com/fa67DJ0.png)
[Documentation for dbt models prepared this week](https://www.notion.so/houseware/c90868d4bb6a49c593a5acf67057e857?v=75a2bd0afd62477a96dcf391f20fbe59)

---

### :100: Objective

Replicate the metrics/tables that Sunil currently fetches manually. Current process:
 - Download Excel reports from Stripe Dashboard
 - Put the right filters, table joins and Excel macros
 - Get the numbers!


# :tada: Automate it now


### git dbt what?

![](https://i.imgur.com/UhsiAoF.png)

On running the SQL transformations:

![](https://i.imgur.com/uveEHwy.png)

### Transformed tables with Goqu

#### Example 1
```
sql, _, _ := goqu.From("test").ToSQL()
fmt.Println(sql)
```

converts to `SELECT * FROM "test"`

#### Example 2
```
sql, _, _ := goqu.From("test").Where(goqu.Ex{
	"d": []string{"a", "b", "c"},
}).ToSQL()
fmt.Println(sql) 
```
gives `SELECT * FROM "test" WHERE ("d" IN ('a', 'b', 'c'))`

__Mascot will now talk to these transformed tables via Goqu__

```
{
    "source": "fivetran_stripe_houseware.houseware__customer_subscriptions",
    "query": "select",
    "fields": [
        {
            "source": "customer",
            "aggregation": "distinct"
        }
    ],
    "filters": {
        "and": [
            {
                "field": "customer",
                "operator": "neq",
                "value": null
            },
            {
                "or": [
                    {
                        "and": [
                            {
                                "field": "organization",
                                "value": "CMD CTR, INC",
                                "operator": "eq"
                            },
                            {
                                "field": "is_subscribed",
                                "value": "true",
                                "operator": "eq"
                            }

                    }
                ]
            }
        ]
    }
}
```

### Challenges:
 - Where are the tests?
 - Discovered new operations like `SELECT extract(month from date)` that would be required in Mascot-Goqu
 - Performance on the transformed tables - indexing on the tran?
 - How will users host our dbt models? As dependencies?
 - How do we scale this system for future SaaS sources?
 - Our Stripe test data was empty and we had to build queries just by looking at the schema. Dummy data generation should be a step in our dbt process!

---

### Thank you! :sheep: 
