Windows Jupyter + Snowflake native reporting
One SQL layer.
Consistent reporting.
Direct queries notebook · Reporting-view notebook · Native dashboard app · App packages
Notebook and native dashboard consumers
These consumers read the stable SF_EVAL_REVIEW_20261105.REPORTING views. The92SQL checks and reporting views are the primary assessment; Python is optional presentation. No Excel workbook, AI service, export pipeline, source mutation or remediation is required. Native connection, import, rendering and execution status: NOT RUN. Offline tests are not a Snowflake compatibility certification.
Use the best-practices guide for check-specific interpretation, anti-patterns, owner validation and remediation. A CANDIDATE is a review lead; CONTEXT is descriptive; UNKNOWN means evidence is insufficient. None establishes a verified violation or pass.
Read the provenance before the signal
Every signal SELECT explicitly projects the eleven assessment fields and seven provenance fields from the contract. Coverage projects its nine contracted fields. Read SOURCE_MODE, SOURCE_STATUS, SOURCE_CAPTURED_AT_UTC, WINDOW_START_UTC, WINDOW_END_UTC and ASSESSMENT_RUN_ID together. Compare capture age with the approved source register; account-usage ingestion latency still applies in live mode. Capture time does not mean all history was complete at capture.
Copied metadata retains its original observation window and capture timestamp. Refreshing a consumer re-reads that copy; it does not make it current. The app displays age at rendering, warns on unknown/future capture timestamps, and reminds the viewer when captures exceed 24 hours. This 24-hour reminder is not the source expiry policy. Registered coverage status and owner validation govern interpretation.
Missing, denied, partial, expired or unsupported evidence remains unknown. An empty source population, empty coverage, schema mismatch or failed query cannot support a healthy result. Query errors are shown; no sample or replacement data is substituted. Other visible tables cannot cure the failed source's coverage. All result sets are capped at 10,000 rows with deterministic ordering. Reaching the cap warns of possible truncation; a result cap does not bound compute or replace configured native history predicates.
Direct anti-pattern notebook
notebooks/direct_antipattern_queries.ipynb contains all92actual AP01–AP92 SQL bodies from sql/direct-live/, each visible in its own %%sql cell; SHOW checks have a preceding capture cell and require the actual capture query ID in the SELECT. Each section includes practice IDs, expected behavior, anti-pattern, interpretation, next action, owner validation, limitations and the master-guide link. It uses the same deliberately run local bootstrap below but requires no deployed project database: queries reference SNOWFLAKE.ACCOUNT_USAGE directly with inline configuration. Its raw eleven-field results are not decorated by the source registry; independently validate visibility, latency and populations, and interpret empty or failed queries as UNKNOWN. Registered reporting status may retain DENIED/PARTIAL/EMPTY/UNSUPPORTED while related reporting signals become UNKNOWN.
The current default window spans seven completed UTC days ending three days before the current UTC midnight, leaving a buffer for slow history ingestion. Snapshot metadata remains current captured state rather than historical state for those dates. Each visible check has its own configuration; review scope/heuristics before execution. AP11's marked synthetic VALUES input deliberately remains UNKNOWN pending owner-approved replacement and coverage validation. No queries or outputs are pre-executed.
Rebuild this notebook after reviewed SQL/catalog changes with python3 notebooks/build_direct_notebook.py. The generator reads local source files, writes only this notebook, and never connects. assessment.ipynb remains the separate stable-view consumer for a deployed reporting layer.
Local Jupyter
- After review, create an isolated Python 3.11 environment and install
python -m pip install -r requirements-notebook.txtfrom the toolkit root. The candidate pins are JupySQL 0.11.1, Snowflake SQLAlchemy 1.7.7 and Notebook 7.4.5. Their published releases were checked; the complete connector dependency resolution and native connection were not tested. These are reviewed candidate pins, not a claim of latest or production certification. - Have the owner supply an approved SQLAlchemy Snowflake URL through the local
SF_ASSESSMENT_SQLALCHEMY_URLenvironment variable using the organization's secret provisioning process. Choose the approved account, role, warehouse, database and authenticator in that configuration. Do not paste a URL/password into a notebook, shell history, a screenshot or this repository. Do not enumerate unrelated environment variables or credentials. - Open
notebooks/assessment.ipynb. Review the bootstrap, then run it deliberately. It creates an engine with logging disabled, suppresses connection output and uses JupySQL's documented engine-variable connection syntax. Connection failure produces a generic visible error; investigate detailed diagnostics privately with the owner. - Run the coverage cell first, then the five page cells: Executive, Spend, Performance, Security and Operations. Each has a visible
%%sqlSELECT. AP01, AP07 and AP10 detail cells link to their practice guidance. No hidden Python analysis reconstructs the assessment. - Clear all cell outputs before saving/sharing. Execution may contain sensitive account metadata even without patient rows. Never print the engine, URL, environment, raw query text or binds. Native execution should be recorded separately with the exact reviewed toolkit revision and owner evidence.
Without Jupyter, run any individual notebooks/sql/*.sql file in an approved Snowflake SQL client. These are the identical SELECTs with comments and no magic/bootstrap dependency. Execute coverage first. They neither create reporting views nor configure sources; deploy and validate the SQL layer separately.
JupySQL supports passing an existing SQLAlchemy engine by variable name and warns against embedding credentials in notebooks: official connection documentation. Published candidate packages: JupySQL, Snowflake SQLAlchemy, Notebook.
Snowflake-native notebooks
The supplied .ipynb targets local Jupyter/JupySQL. Do not assume its external connection bootstrap is appropriate inside Snowflake. Create a native notebook with the approved role/query warehouse; omit the JupySQL installation and bootstrap and paste the SELECT bodies from notebooks/sql/ into native SQL cells. Snowflake supports SQL, Python and Markdown cells; the native SQL execution context supplies authentication. Review your account's current notebook runtime and import support before use. No native import test was run.
See Snowflake notebook SQL cells and execution and current Workspaces notebook limitations.
Snowflake-native dashboard: warehouse Streamlit
Use dashboards/streamlit_app.py with adjacent dashboards/environment.yml in a warehouse runtime Streamlit in Snowflake app. The application imports the active Snowpark session only after the viewer clicks Refresh selected page and coverage. It never creates a client connector or reads credentials. There is no background refresh or automatic polling; opening the app executes no assessment SELECTs. Changing a page requires another explicit refresh.
The app accepts only literal V_DASHBOARD_EXECUTIVE, V_DASHBOARD_SPEND, V_DASHBOARD_PERFORMANCE, V_DASHBOARD_SECURITY, V_DASHBOARD_OPERATIONS, V_ALL_SIGNALS and V_COVERAGE. Projections must exactly match the contract or rendering fails visibly. Database/view identifiers are not free-text inputs. All access is SELECT-only; no setup/deployment SQL is hidden in the app.
Before deployment, an administrator should verify approved read-only reporting-view access, warehouse usage, app creation privileges and named viewers. Owner's-rights execution may expose metadata beyond a viewer's own source privileges; review sharing deliberately. Select a supported Python version separately in Snowflake; environment.yml intentionally lists only streamlit, pandas and snowflake-snowpark-python. Resolve available compatible package versions in the account package picker. Do not deploy this warehouse-session implementation as a container app: Snowflake documents different session handling for container runtimes.
After approved upload, choose the main file, select the warehouse runtime and query warehouse, review environment packages, then preview. Select each page and explicitly refresh, verifying native schema, visible provenance, empty/error behavior and charts against the same worksheet SELECT. App creation, upload and publication were not performed here. See runtime differences, package management, runtime migration and session differences and owner's-rights behavior.
Each successful nonempty page includes its full returned table and provenance plus separate bar charts for each check/unit, limited to the first 30 distinct measured observations. Spend exposes measured credits; performance exposes query spill observations; security exposes hierarchy depth and privileged-assignment observations. Unknown rows are retained in tables, excluded from numeric charts. Values are not added across units, sources, practices or checks. AP10 UNIT='users' rows represent distinct enabled ACCOUNTADMIN-capable users; multiple practice mappings are deduplicated as identical observations for charts. A bar value of one is an assignment observation, not an account total, proven misuse or savings. AP07 charts describe potential hierarchy depth, not demonstrated disclosure. Full interpretation belongs to the best-practices guide.
Worksheet/chart SQL and legacy Snowsight tiles
dashboards/snowsight_tiles.sql contains actual standalone SELECTs for all five pages, coverage and the three detail checks. There is no fabricated import JSON or claimed automatic dashboard import. Copy one SELECT at a time to an approved supported SQL worksheet/chart surface, retain provenance, and choose the measured value and object/subject as chart axes only within one check/unit.
Legacy Snowsight Dashboards are not the primary deployment path. Snowflake's official documentation announces their removal on June 22, 2026, before this toolkit's November 5, 2026 review date. Do not plan a new deployment around the historical Dashboard tile menu. Use warehouse Streamlit or the worksheet/chart features actually available in the account. The SQL file remains useful independently of that removed interface. Official dashboard deprecation notice.
Offline verification and remaining acceptance
python3 -m unittest discover -s tests -p test_consumers.py -v checks the independent interface field list, seven-view allowlist, injection rejection before session use, denied/schema/empty error handling, no query on app opening, result limits, visible notebook cells/direct SQL equivalence and environment/runtime restrictions. These tests use controlled local test doubles and never represent client findings. They do not prove Snowflake grants, SQL source correctness, native package availability, notebook import, query runtime or successful deployment. Those require an explicitly approved native validation run; record them as NOT RUN until observed.
Expanded methods and required inputs
70checks inspect native metadata (20use read-only SHOW captures),1inspects an approved completed SELECT profile, and21validate explicitly supplied evidence records. All74practices are mapped:55have metadata/profile signals,19use supplied-evidence validation only. The latter cannot establish the truth of an external process, recovery exercise or business approval. Direct inputs are typed empty/unknown defaults; replace them with approved evidence, never demo fixtures.
For SHOW cells, run the native command, record its actual query ID, and replace <APPROVED_CAPTURE_QUERY_ID> in the next SELECT. Where present, also fill <APPROVED_CAPTURE_TIMESTAMP_UTC> with the original collection timestamp; do not use today's time for an old result. Commands with database/warehouse placeholders require an approved identifier. Profile checks require the approved completed SELECT query ID. These are explicit operator steps; the notebook does not enumerate objects or execute client workload SQL automatically.
Live plus copied capture sources may yield SOURCE_MODE=MIXED; inspect each source in V_COVERAGE and require approved, coherent windows and filters. Metadata-only SOURCE wrappers read ACCOUNT_USAGE; SHOW, profile and supplied-evidence wrappers read typed RAW captures. A failed live retarget preserves the existing RAW wrapper, records UNKNOWN plus SQLCODE in the registry, and does not qualify or fabricate that source.
Deploy the shared view layer
Deployment and evidence runbook
Choose the smallest route
For an interview or initial investigation, run individual sql/direct-live/AP*.sql SELECTs; no application deployment is needed. Record account, role, warehouse, toolkit hash, actual query IDs, time, scope and interpretation in the approved evidence location. The query's default is seven complete UTC days ending three days before current UTC midnight, to leave an ingestion buffer; agree a representative window with owners. A thirty-day operational baseline and ninety-day cost trend may be appropriate after sources and workload seasonality are confirmed. Defaults are not client SLOs or policy.
No metadata source guarantees full visibility. Account Usage privileges, edition, feature support, retention and latency must be checked. Query-history database is compilation context, not complete accessed-object lineage. The snapshot role, user, column, policy, table and dependency views describe captured current state, not historical state for the workload observation window.
Deploy a reporting layer in a new namespace
Have the authorized operator inspect all SQL first, including Snowflake Scripting blocks. Working analysis roles should be least privilege; do not require ACCOUNTADMIN as the analyst role. Use an approved small warehouse, statement timeout and scoped source privileges. Do not execute client production remediations as part of this pack.
- Confirm
SF_EVAL_REVIEW_20261105is unused. Runsql/setup/00_create_new_database.sqlonce. It creates its own database and typed RAW, SOURCE, META, ANALYSIS and REPORTING objects. A collision must fail; never add IF NOT EXISTS or OR REPLACE to adopt a database. If any script fails, capture error/query ID and inventory created objects; stop that sequence instead of blindly rerunning it. - Set exactly one
META.ASSESSMENT_CONFIGrecord with a unique assessment run ID, approved UTC window, optional warehouse/database filters and agreed heuristic values. The generated V_CONFIG rejects missing/invalid or duplicate configuration. A database filter in workload SQL restricts compilation context; it is not an access boundary. RBAC graph collection requires account-level topology. - Choose one adapter:
01_source_from_copies.sqlfor typed RAW tables, or02_source_from_live.sqlfor ACCOUNT_USAGE. These are state-changing project-owned view setup scripts. They clear source attestations before retargeting. On privilege or missing-feature failure stop, record the partial setup and qualify only the dependent check after resolving its evidence route; do not represent all sources as present. - For AP11, the privacy owner supplies approved
META.APPROVED_SENSITIVE_COLUMNS: object identifiers, classification, whether masking is required, approval reference and sample-population flag. An empty or placeholder inventory cannot prove that sensitive data is protected. No patient-row profiling is performed. Runtime masking and downstream copies require separate evidence. - Run
03_analysis_views.sql, then04_reporting_views.sql. Each checks the project ownership marker before changing only project objects. These scripts require their declared sources. If a required source is unavailable, record the gap and use the relevant standalone queries rather than inventing tables or substituting sample evidence. - Validate every source in
META.SOURCE_REGISTRYfor the run: mode LIVE/COPY/SYNTHETIC, status COMPLETE/PARTIAL/DENIED/UNSUPPORTED/EMPTY/UNKNOWN, captured timestamp for copies, exact window and warehouse/database extraction filters (NULL means no such filter), captured row count, named attester and substantive attestation. COMPLETE is a human-reviewed evidence decision, never inferred from a successful SELECT or nonzero row count. Source staleness/latency, visibility and collection coverage belong in that attestation. Omitted or duplicate rows remain unknown. Broadening or changing either configured filter invalidates prior completeness until the source is recollected or its scope revalidated and explicitly reattested. The pack does not automatically expire an approved source based on an arbitrary age threshold: reassess the approval before reuse. - Execute
REPORTING.V_COVERAGE, inspect all check dependencies, then reporting SELECTs innotebooks/sql/. Compare actual values with source evidence and owner expectations. Record any native schema/SQL discrepancies. Capture hashes and actual query IDs; local test results do not substitute for these checks. - Deploy consumers only after the SQL layer is qualified for the exact environment. Read the separate notebook/dashboard guide. Review native app owner-rights access and permitted viewers before sharing.
When direct access is denied
The client runs the bounded, explicit-column SQL under sql/metadata-exports/ and delivers approved metadata in the client-approved location. The queries exclude raw SQL text, binds, error messages, file names and patient rows. Object and identity metadata may still be sensitive. RBAC role/user/grant topology is account-level even when object-analysis filters are narrow; negotiate that evidence scope explicitly. Do not strip role-grant edges by database filter and then claim effective-access completeness.
Save the exact query/version, actual query ID, role, capture UTC time, observation window, filters, row count, checksum, source limitations and visibility validation beside each export. A 10,000-row cap reached means PARTIAL; narrow a coherent scope or collect reviewed nonoverlapping partitions with complete reconciliation. Do not attest a truncated graph as complete. Matching counts alone do not prove equivalent privileges or schema.
Transfer only approved exports; load into the matching typed RAW table with an approved client-operated load method (for example Snowsight table loading). This toolkit does not activate stages, external integrations, paid features or upload data automatically. Map columns by explicit name/order and preserve nulls, booleans, timestamps/timezones and VARIANT values. Reject a schema mismatch. Reconcile the imported rows/checksum/period with the original export; record any conversion. For refreshes use a newly reviewed run/capture and replace data only under an explicit approved loading plan; the analysis app never loads or rewrites data.
Keep live and copied populations coherent. Query attribution and metering must cover the same completed windows and compatible standard warehouse population. Serverless, AI, cloud services, storage, transfer and Adaptive Warehouse-specific metering are outside the AP12 subtraction; its result is diagnostic, never guaranteed avoidable spend or currency savings. Cost reconciliation to the actual bill is a separate assessment procedure.
Synthetic rehearsal
fixtures/metadata.json contains synthetic metadata stories with healthy, problematic and unknown cases, never Acaria telemetry. After creating a fresh empty lab namespace, select that new database as the current database, then inspect/run 05_synthetic_fixture.sql: it is state-changing seed data for RAW and META, blocked for nonempty RAW tables and marked SYNTHETIC. Select the copy adapter, then create analysis/reporting views. Do not relabel these synthetic records as client evidence. The seed uses its own fixed observation window; do not run it against today's moving default window.
Offline tests execute translated SQL on this fixture and compare source-switch results. Native rehearsal still needs the approved account, package, query IDs, actual outputs and rendered-page evidence. Test every page: Executive, Spend, Performance, Security, Operations and coverage. Inject denied/partial sources and confirm UNKNOWN without a fabricated healthy fallback. Keep the same release hashes in the handover.
From result to advisory recommendation
For every material candidate record: practice ID → check/query version → approved source/run/window → measured observation → owner validation → business consequence → causal hypothesis/test still needed → options → proposed roadmap package. Include what works, what is unassessed and what is disputed. A remediation suggestion becomes an accountable next-phase package only after scope, owner, prerequisites, indicative effort and future acceptance are agreed. Nothing in this assessment authorizes implementation.
Expanded source handling
There are56typed sources. Setup00creates default SOURCE views over RAW, so an unavailable native feature does not stop unrelated view definitions from compiling. In live mode, each native retarget is isolated; failure keeps the prior typed source and records UNKNOWN with SQLCODE. Inspect the registry and classify denied/unsupported/schema failures from actual operator evidence; a successful setup block is not collection completeness. SHOW, profile and approved-input sources stay captured in RAW even in live mode. Every required source remains unverified until its own truthful attestation.
Default ACCESS_HISTORY exports preserve array cardinalities with count-only markers and omit original names/column payloads. They support count diagnostics; AP69willremainUNKNOWN. ACCESS_HISTORY_IDENTIFIERS_APPROVAL_REQUIRED.sql is an optional, separately approved projection of direct/base objectName only. Object identifiers can still be sensitive. No original column arrays, external locations, query text or patient records belong in those exports. The transformations use documented Snowflake TRANSFORM.