Prop title (#120)

* add in prop title & description

* profile
This commit is contained in:
Jessica Huhnke 2023-04-05 13:41:50 -05:00 committed by GitHub
parent e776a5f7ba
commit ff5ad77e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 1 deletions

View File

@ -16,5 +16,7 @@ SELECT
tx_succeeded,
proposer,
proposal_id,
proposal_type
proposal_type,
proposal_title,
proposal_description
FROM {{ ref('silver__governance_submit_proposal') }}

View File

@ -29,5 +29,13 @@ models:
- dbt_expectations.expect_column_to_exist
- name: PROPOSAL_TYPE
description: "{{ doc('proposal_type') }}"
tests:
- dbt_expectations.expect_column_to_exist
- name: PROPOSAL_TITLE
description: "{{ doc('proposal_title') }}"
tests:
- dbt_expectations.expect_column_to_exist
- name: PROPOSAL_DESCRIPTION
description: "{{ doc('proposal_description') }}"
tests:
- dbt_expectations.expect_column_to_exist

View File

@ -0,0 +1,5 @@
{% docs proposal_description %}
The description or body of the governance proposal.
{% enddocs %}

View File

@ -0,0 +1,5 @@
{% docs proposal_title %}
The title of the governance proposal that was submitted on-chain.
{% enddocs %}

View File

@ -97,6 +97,8 @@ SELECT
proposer,
p.proposal_id :: NUMBER AS proposal_id,
y.proposal_type,
tx_body :messages[0] :content :title :: STRING AS proposal_title,
tx_body :messages[0] :content :description :: STRING AS proposal_description,
_inserted_timestamp
FROM
proposal_ids p

View File

@ -62,6 +62,24 @@ models:
column_type_list:
- STRING
- VARCHAR
- name: PROPOSAL_TITLE
description: "{{ doc('proposal_title') }}"
tests:
- not_null:
where: tx_id <> '515A92D6DE7561E1BCDB11C0D453BFDE87B25F981F8E94AFB848CA97EA65F34A' ## We are missing this transaction body
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: PROPOSAL_DESCRIPTION
description: "{{ doc('proposal_description') }}"
tests:
- not_null:
where: tx_id <> '515A92D6DE7561E1BCDB11C0D453BFDE87B25F981F8E94AFB848CA97EA65F34A' ## We are missing this transaction body
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: _INSERTED_TIMESTAMP
description: "{{ doc('inserted_timestamp') }}"
tests: