
The Snowflake Data Sharing settings page, showing one account already receiving data and the SQL to accept the share.
Before you start
- You need the Admin role in allGood to reach the Snowflake Data Sharing settings.
- You need ACCOUNTADMIN (or another role that can create databases and grant database roles) in the Snowflake account receiving the data.
- Your Snowflake account must be in the same cloud region as your allGood account. If it isn’t, contact allGood before you begin.
1
Open the Snowflake Data Sharing settings
In allGood, go to Settings → Snowflake Data Sharing.If you haven’t shared with anyone yet, the page shows a single field asking for an account ID. Otherwise it lists the accounts already receiving data.
2
Find your Snowflake account ID
allGood identifies your warehouse by its account ID — your organization name and account name joined by a dot, like Copy the single value it returns.
ACMEORG.ANALYTICS_PROD.Run this in the Snowflake account you want the data in:4
Copy the script to accept the share
Under Accept shared data, click Copy. Paste the script into an SQL console and execute it as
ACCOUNTADMIN (or another sufficiently-privileged role) to accept the data share.The script names a database (ALLGOOD_SHARED_DATA by default) and a role (ACCOUNTADMIN) to grant access to. To change either, click ⚙ Options — or click the underlined values in the script itself. The database exists only in your account, so you can call it whatever fits your naming conventions.5
Grant access to your own roles
The script grants access to whichever single role you chose. To let your analysts query the data, grant the shared database role onward to their roles:
6
Verify it works
Query one of the shared views:If you get a row count, you’re done. If the database looks empty, check that you ran the third statement in step 5 and that you’re querying as a role that holds
SHARED_ACCESS_ROLE.Revoking access
To stop sharing with an account, click Revoke Share on its row in the table and confirm. Revocation is immediate. Queries running against the shared database in that account stop returning rows, and the database has to be recreated with the script above if you later share with the same account again. Other accounts are unaffected.Data Schema
Shared data lives in theMK_SHARE schema and is organized around four views.
allGood’s data model separates who someone is from what you know about them and what they did. Entities are resolved people and companies. Records are typed sets of fields attached to an entity — one record per source or per kind of fact. Activities are behavioural events. And every field change ever applied is kept as an auditable data change, along with the explanation of why it was made.
MK_SHARE.ENTITY
One row per resolved entity.
MK_SHARE.RECORD
One row per record, holding its current field values.
MK_SHARE.ACTIVITY
One row per behavioural event.
Activities are deliberately not attached to an entity. They arrive at high volume and are matched to entities downstream, so to attribute activity to a person, join through the records that allGood derives from them rather than expecting an
entity_id here.
MK_SHARE.DATA_CHANGE
An append-only log of every field change ever applied to a record — the audit trail behind everything in RECORD.
Changes that only re-attached a record to a different entity carry no field change, and are left out of this view.
Working with the data
Fields inside aVARIANT are read with Snowflake’s path syntax, and should be cast to the type you expect:
Filter out merged entities
Filter out merged entities
Identity resolution merges entities as it learns more, and the merged-away entity stays in
ENTITY so that old IDs keep resolving. Add where superseded_by is null for a list of live entities only, or follow superseded_by to find where an old ID ended up.These are secure views, not tables
These are secure views, not tables
Sharing requires secure views, which is what keeps the underlying data inaccessible. Snowflake restricts some query optimizations against them, so expect them to be slower than an equivalent local table. If you’re running heavy or repeated analysis, materialize what you need into a table in your own account first.
Freshness differs by view
Freshness differs by view
ACTIVITY and DATA_CHANGE are append-only and current as of the moment you query. ENTITY and RECORD are rollups that allGood refreshes as it processes data, so they can trail the change log slightly.