Snowflake Cortex
One query over the account usage view for Cortex AI functions: the day, the function, the model, the credits, the tokens or pages, and how many queries. Never a table of yours, never a prompt.
Access
- Kind
- A read-only key you paste
- What to give
- Account, token and a warehouse
- Why that one
- A programmatic access token for a user who can read the account usage views, and a warehouse to run one query on. Valistry runs that query and nothing else.
What it attributes on its own
- From the source
- day · Cortex function · model where one was named · queries · tokens in and out, or pages · what Snowflake billed in credits, at your price per credit
- Needs a rule or a trace
- who ran the query — the view carries a user id, which is not read in this version · team, workflow and agent unless a rule maps the function · outcome
Connecting it
- Create a programmatic access token. Snowsight → Governance & Security → Users & Roles → your user → Programmatic access tokens → Generate new token. Restrict it to a role that can read SNOWFLAKE.ACCOUNT_USAGE; a network policy on the user is Snowflake's default requirement. Open ↗
- Copy the account identifier and a warehouse name. Admin → Accounts shows the identifier; any running warehouse will do.
- Find your price per credit. On your contract or the last invoice.
- Paste the values and click Test and connect. Valistry runs the query over the last seven days, reports what it found, then fills thirty.
Snowflake's own usage is on the bill in credits; where a Cortex model is also reached through a gateway you connect, connect only one of the two for that traffic.