diff --git a/models/core/core__fact_governance_submit_proposal.sql b/models/core/core__fact_governance_submit_proposal.sql index 122d221..240c23d 100644 --- a/models/core/core__fact_governance_submit_proposal.sql +++ b/models/core/core__fact_governance_submit_proposal.sql @@ -16,5 +16,7 @@ SELECT tx_succeeded, proposer, proposal_id, - proposal_type + proposal_type, + proposal_title, + proposal_description FROM {{ ref('silver__governance_submit_proposal') }} \ No newline at end of file diff --git a/models/core/core__fact_governance_submit_proposal.yml b/models/core/core__fact_governance_submit_proposal.yml index a2ecd7d..4b24a7e 100644 --- a/models/core/core__fact_governance_submit_proposal.yml +++ b/models/core/core__fact_governance_submit_proposal.yml @@ -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 \ No newline at end of file diff --git a/models/descriptions/proposal_description.md b/models/descriptions/proposal_description.md new file mode 100644 index 0000000..5c37c56 --- /dev/null +++ b/models/descriptions/proposal_description.md @@ -0,0 +1,5 @@ +{% docs proposal_description %} + +The description or body of the governance proposal. + +{% enddocs %} \ No newline at end of file diff --git a/models/descriptions/proposal_title.md b/models/descriptions/proposal_title.md new file mode 100644 index 0000000..7c04919 --- /dev/null +++ b/models/descriptions/proposal_title.md @@ -0,0 +1,5 @@ +{% docs proposal_title %} + +The title of the governance proposal that was submitted on-chain. + +{% enddocs %} \ No newline at end of file diff --git a/models/silver/silver__governance_submit_proposal.sql b/models/silver/silver__governance_submit_proposal.sql index 14707da..e7d1534 100644 --- a/models/silver/silver__governance_submit_proposal.sql +++ b/models/silver/silver__governance_submit_proposal.sql @@ -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 diff --git a/models/silver/silver__governance_submit_proposal.yml b/models/silver/silver__governance_submit_proposal.yml index e8a8ff3..f4e28d2 100644 --- a/models/silver/silver__governance_submit_proposal.yml +++ b/models/silver/silver__governance_submit_proposal.yml @@ -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: diff --git a/profiles.yml b/profiles.yml index a2530f2..bf40889 100644 --- a/profiles.yml +++ b/profiles.yml @@ -3,27 +3,16 @@ osmosis: outputs: dev: type: snowflake - account: "{{ env_var('ACCOUNT') }}" - user: "{{ env_var('USER') }}" - password: "{{ env_var('PASSWORD') }}" - role: "{{ env_var('ROLE') }}" - schema: "{{ env_var('SCHEMA') }}" - region: "{{ env_var('REGION') }}" - database: "{{ env_var('DATABASE') }}" - warehouse: "{{ env_var('WAREHOUSE') }}" - threads: 8 - client_session_keep_alive: False - prod: - type: snowflake - account: "{{ env_var('ACCOUNT') }}" - user: "{{ env_var('USER') }}" - password: "{{ env_var('PASSWORD') }}" - role: "{{ env_var('ROLE') }}" - schema: "{{ env_var('SCHEMA') }}" - region: "{{ env_var('REGION') }}" - database: "{{ env_var('DATABASE') }}" - warehouse: "{{ env_var('WAREHOUSE') }}" - threads: 8 + account: vna27887.us-east-1 + role: INTERNAL_DEV + user: jessica@flipsidecrypto.com + authenticator: externalbrowser + region: us-east-1 + database: OSMOSIS_DEV + warehouse: DBT_EMERGENCY + schema: silver + threads: 12 client_session_keep_alive: False + query_tag: dbt_JESSICA_dev config: send_anonymous_usage_stats: False \ No newline at end of file