Skip to content

Instantly share code, notes, and snippets.

@dave-connors-3
dave-connors-3 / manifest.json
Created November 17, 2021 14:53
metrics block of the manifest.json
{
"metrics": {
"metric.claim_to_fame.total_claim_payments": {
"fqn": [
"claim_to_fame",
"marts",
"total_claim_payments"
],
"unique_id": "metric.claim_to_fame.total_claim_payments",
"package_name": "claim_to_fame",
{% macro check_dupes(model, column_name) %}
with errors as (
{{ test_unique(model, column_name) }}
)
select * from {{ model }}
inner join errors on {{ model.name }}.{{ column_name }} = errors.unique_field
order by {{ column_name }}
source_data as (
select
'DAVE' as name,
'LAPTOP' as device,
'2022-03-04'::date as load_date
union all
select
@dave-connors-3
dave-connors-3 / .sqlfluff
Created February 13, 2023 20:27
dbt labs sqlfluff
[sqlfluff]
dialect = snowflake
templater = dbt
runaway_limit = 10
rules = L002, L004, L005, L010, L011, L012, L013, L014, L016, L018, L019, L022, L023, L027, L030, L031, L032, L033, L034, L040, L046, L048, L042, L051, L054, L065
max_line_length = 80
indent_unit = space
# Rule definitions:
# L002: Mixed Tabs and Spaces in single whitespace