AN-5113/warpcast-power-users (#79)

This commit is contained in:
drethereum 2024-08-20 11:17:03 -06:00 committed by GitHub
parent af875e3252
commit 6b6556a108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 41 additions and 1 deletions

View File

@ -89,6 +89,7 @@ Note: These tables ceased updating on Feburary 4th, 2024.
**Farcaster (Neynar)**
- [dim_fids](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__dim_fids)
- [dim_fnames](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__dim_fnames)
- [dim_profile_with_addresses](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__dim_profile_with_addresses)
- [fact_casts](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__fact_casts)
- [fact_links](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__fact_links)
- [fact_reactions](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__fact_reactions)
@ -96,6 +97,7 @@ Note: These tables ceased updating on Feburary 4th, 2024.
- [fact_storage](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__fact_storage)
- [fact_user_data](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__fact_user_data)
- [fact_verifications](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__fact_verifications)
- [fact_warpcast_power_users](https://flipsidecrypto.github.io/external-models/#!/model/model.external_models.farcaster__fact_warpcast_power_users)
## **Helpful User-Defined Functions (UDFs)**

View File

@ -0,0 +1,21 @@
{{ config(
materialized = 'view',
persist_docs ={ "relation": true,
"columns": true },
tags = ['farcaster'],
meta ={ 'database_tags':{ 'table':{ 'PROTOCOL': 'FARCASTER' } } }
) }}
SELECT
fid,
created_at,
updated_at,
deleted_at
FROM
{{ source(
'external_bronze',
'farcaster_warpcast_power_users'
) }}
qualify(ROW_NUMBER() over (PARTITION BY fid
ORDER BY
updated_at DESC)) = 1

View File

@ -0,0 +1,16 @@
version: 2
models:
- name: farcaster__fact_warpcast_power_users
description: Represents data associated with power users, based on Warpcast power badges. For more info see [Neynar](https://docs.neynar.com/docs/how-to-query-neynar-sql-playground-for-farcaster-data) or [schema](https://github.com/farcasterxyz/hub-monorepo/tree/51c57245df8ec1c68d616dd3ab8ae5b80edf68fd/apps/replicator)
columns:
- name: FID
description: FID of the user that signed the message.
- name: CREATED_AT
description: When the row was first created in this DB (not the same as the message timestamp!)
- name: UPDATED_AT
description: When the row was last updated.
tests:
- not_null
- name: DELETED_AT
description: When the data was considered deleted by the hub

View File

@ -84,4 +84,5 @@ sources:
- name: farcaster_reactions
- name: farcaster_user_data
- name: farcaster_verifications
- name: farcaster_profile_with_addresses
- name: farcaster_profile_with_addresses
- name: farcaster_warpcast_power_users