version: 2

models:
  - name: int_user_follower_counts_daily
    description: |
      Daily aggregation of user follower and following counts derived from the rds_profile_follow snapshot.
      Uses SCD Type 2 snapshot to calculate point-in-time follower/following counts for each user and date.
      This table captures the full history of relationship changes, allowing for historical analysis of user growth.
    config:
      group: community
    meta:
      dagster:
        partitions_def:
          type: daily
          start_date: 2025-11-11
          end_offset: 0
        partition_mappings:
          - asset_key: ['rds_snapshots', 'rds_profile_follow__snapshot']
            type: identity
          - asset_key: ['prod', 'dim_date']
            type: identity
        automation_condition: daily_cron_with_eager_historical_backfill_condition
        backfill_policy:
          max_partitions_per_run: 14
    columns:
      - name: user_id
        description: "User identifier"
      - name: total_following_cnt
        description: "Number of users this user is following on this date"
      - name: total_follower_cnt
        description: "Number of users following this user on this date"
      - name: p_date
        description: "Partition date for this snapshot"
