Skip to content

Commit

Permalink
Charles/issue 187 (#189)
Browse files Browse the repository at this point in the history
* Support docs blocks in exposure description
  • Loading branch information
charles-astrafy authored Aug 31, 2022
1 parent 9146d71 commit f67b2b9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
11 changes: 11 additions & 0 deletions integration_test_project/models/exposure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% docs clickstream %}

This dashboard contains clickstream events from the marketing website.

The events in this table are recorded by Snowplow and piped into the warehouse on an hourly basis. The following pages of the marketing site are tracked:
- /
- /about
- /team
- /contact-us

{% enddocs %}
13 changes: 13 additions & 0 deletions integration_test_project/models/tests_and_exposures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,16 @@ exposures:
owner:
name: Claire from Data
email: [email protected]

- name: "CIO dashboard"
type: dashboard
maturity: high
description: '{{ doc("clickstream") }}'
url: https://bi.tool/dashboards/1

depends_on:
- ref('incremental')

owner:
name: Henry from IT
email: [email protected]
2 changes: 1 addition & 1 deletion macros/upload_exposures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
parse_json('{{ tojson(exposure.owner) | replace("'","\\'") }}'), {# owner #}
'{{ exposure.maturity }}', {# maturity #}
'{{ exposure.original_file_path | replace('\\', '\\\\') }}', {# path #}
'{{ exposure.description | replace("'","\\'") }}', {# description #}
"""{{ exposure.description | replace("'","\\'") }}""", {# description #}
'{{ exposure.url }}', {# url #}
'{{ exposure.package_name }}', {# package_name #}
{{ tojson(exposure.depends_on.nodes) }} {# depends_on_nodes #}
Expand Down

0 comments on commit f67b2b9

Please sign in to comment.