Skip to main content

6 posts tagged with "Tutorial"

Step-by-step guides and walkthroughs

View All Tags

Build an Incremental Inventory Change Feed with Gnok CDC Streams

· 6 min read
Gnok Team

An inventory table may contain millions of products, but a downstream stock monitor usually needs only the rows that changed. Repeatedly scanning the full table wastes compute and makes deletes especially difficult to detect.

Gnok CDC streams turn the Iceberg snapshots behind a table into a bounded change feed. In this tutorial, we will create an inventory stream, inspect inserts, updates, and deletes, and acknowledge a batch after processing it.

From JSON to Iceberg: Bulk-Loading a Document Dataset into Gnok

· 7 min read
Gnok Team

We recently needed to land a large pile of JSON documents — roughly 50 GB across ~70 datasets, including a couple of 15+ GB monsters — into Gnok so it could be queried with SQL alongside everything else. The documents were schemaless and deeply nested; Gnok tables are columnar Iceberg. This post walks through the pipeline we landed on, and the handful of gotchas that shaped it.

From Data to SQL-Callable Model: An End-to-End Tour of Gnok Notebooks

· 4 min read
Gnok Team

Gnok Studio now has an in-product Python notebook. You write Python against governed Gnok data, train a model, and register it so it's callable from SQL with ML_PREDICT — the whole train→serve loop, in one place, with no data movement and no separate notebook server to babysit.

This post builds a complete example end to end: read data, explore it, engineer features, train a scikit-learn pipeline, register it, and score new rows from SQL — then let Gnok AI write a cell for us.

AI in the WHERE Clause: AI_FILTER and AI_FILTER_AGG

· 5 min read
Gnok Team

SELECT * FROM reviews WHERE AI_FILTER('is a complaint about shipping', body).

If that line of SQL works, a whole class of "I just need to find the rows where X holds, and X isn't a regex" problems disappears. Gnok's AI_FILTER family lands the natural-language predicate in the place where you'd actually write it — alongside =, LIKE, and BETWEEN.

This post walks through the four new functions, the patterns they unlock, and how to keep cost predictable when LLMs are sitting in your hot path.

Building a Real-Time Fraud Detection Pipeline with Gnok

· 10 min read
Gnok Team

This tutorial builds a complete fraud detection system inside Gnok -- from data ingestion to ML scoring to alerting -- without any external services. We'll use COPY INTO for bulk loading, vector similarity for merchant profiling, statistical anomaly detection for flagging outliers, and natural language queries for ad-hoc investigation.

Building Custom WASM UDFs for Gnok: A Step-by-Step Guide

· 8 min read
Gnok Team

Gnok's WebAssembly UDF system lets you extend SQL with custom functions written in Rust, Go, C, or any language that compiles to WASM. Your functions run inside the query engine with near-native performance, sandboxed execution, and automatic distribution across cluster workers.

This tutorial walks through building a WASM UDF from scratch, registering it, and using it in queries.