Skip to content

Document user_profiles_mv and user_labels tables#88

Merged
yosriady merged 1 commit into
mainfrom
claude/compassionate-ride-ls3ba3
Jun 23, 2026
Merged

Document user_profiles_mv and user_labels tables#88
yosriady merged 1 commit into
mainfrom
claude/compassionate-ride-ls3ba3

Conversation

@yosriady

@yosriady yosriady commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Added documentation for two new project-scoped data tables: user_profiles_mv (first-party user profile traits from identify events) and user_labels (custom labels and tags assigned to wallet addresses). Updated the aggregate tables reference to include user_profiles_mv and document the argMaxIfMerge function pattern.

Changes

  • Added user_profiles_mv table documentation with full column reference, use cases, and example query showing proper aggregate table usage with -Merge functions
  • Added user_labels table documentation with column definitions and use cases for custom segmentation and scoring
  • Updated aggregate tables section to include user_profiles_mv in the list of tables using ClickHouse AggregateFunction types
  • Added argMaxIfMerge pattern to the aggregate function reference table to document the conditional max aggregation function

Implementation details

  • user_profiles_mv is documented as an AggregatingMergeTree with a warning to use -Merge functions and GROUP BY address
  • user_labels is positioned as the project-specific counterpart to the global wallet_profiles_labels table
  • Both tables are placed in logical positions within the catalog (user_profiles_mv before wallet_profiles_mv, user_labels after wallet_profiles_labels)

https://claude.ai/code/session_01XeF9u7YLwBCXtsADz9esGH


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Document two new warehouse tables in the data catalog:

- user_profiles_mv: project-scoped, first-party identify traits, placed
  next to identities as the identity-data counterpart to
  wallet_profiles_mv. Flagged as an AggregatingMergeTree with a -Merge /
  argMaxIfMerge querying note.
- user_labels: project-scoped labels you assign to addresses, placed next
  to wallet_profiles_labels (its global counterpart). Omits the internal
  _is_deleted column to match the wallet_profiles_labels entry.

Also list user_profiles_mv in the aggregate-tables section and add an
argMaxIf row to the quick reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeF9u7YLwBCXtsADz9esGH

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for the new user_profiles_mv and user_labels tables in data/catalog.mdx, and updates the aggregate tables section. The reviewer noted that documenting the columns of the aggregate table user_profiles_mv with simple types like String and DateTime is misleading and inconsistent. They suggested updating the table format to explicitly specify the ClickHouse AggregateFunction types and query functions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread data/catalog.mdx
Comment on lines +377 to +389
| Column | Type | Description |
|--------|------|-------------|
| `address` | String | Wallet address (primary key within your project) |
| `user_id` | String | Your own external user identifier |
| `display_name` | String | Display name |
| `email` | String | Email address |
| `farcaster`, `discord`, `twitter`, `telegram`, `instagram`, `github`, `linkedin`, `facebook`, `tiktok`, `youtube`, `reddit` | String | Social handles |
| `website` | String | Website URL |
| `ens`, `lens`, `basenames`, `linea` | String | Web3 name-service handles |
| `avatar` | String | Avatar image URL |
| `description` | String | Bio / description |
| `location` | String | Location |
| `updated_at` | DateTime | Last time any trait was updated |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since user_profiles_mv is an aggregate table (AggregatingMergeTree), documenting the columns with simple types like String and DateTime is inconsistent with the rest of the catalog (e.g., the users and wallet_profiles_mv tables). It is also misleading to users, as querying these columns directly will return binary aggregate states instead of readable values.

Updating the table to use the Query Function format and specifying the actual ClickHouse AggregateFunction types will make it clear how to query these fields.

| Column | Type | Query Function |
|--------|------|---------------|
| `address` | String | Direct access |
| `user_id` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(user_id)` |
| `display_name` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(display_name)` |
| `email` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(email)` |
| `farcaster`, `discord`, `twitter`, `telegram`, `instagram`, `github`, `linkedin`, `facebook`, `tiktok`, `youtube`, `reddit` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(column_name)` |
| `website` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(website)` |
| `ens`, `lens`, `basenames`, `linea` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(column_name)` |
| `avatar` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(avatar)` |
| `description` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(description)` |
| `location` | AggregateFunction(argMaxIf, String, DateTime, UInt8) | `argMaxIfMerge(location)` |
| `updated_at` | SimpleAggregateFunction(max, DateTime) | `max(updated_at)` |

@yosriady yosriady merged commit 1aeaf42 into main Jun 23, 2026
4 checks passed
@yosriady yosriady deleted the claude/compassionate-ride-ls3ba3 branch June 23, 2026 06:09
@mintlify

mintlify Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
formo 🔴 Failed Jun 23, 2026, 6:19 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants