ContextFlow
Real-time clickstream × market × weather × transit
enrichment pipeline.
ContextFlow joins live web events (PostHog / Umami) with external
context — Finnhub market data, Open-Meteo weather, GTFS-RT transit — on
Apache Beam / Cloud Dataflow, landing enriched rows in BigQuery for
Power BI.
Try it
Publish a synthetic clickstream event to the live GCP Pub/Sub topic
contextflow-events. Watch it land in BigQuery within a
minute.
Event type
random
pageview
// Injected at deploy time (sed replaces https://t6p3r6a7kc.execute-api.us-east-1.amazonaws.com).
const API = "https://t6p3r6a7kc.execute-api.us-east-1.amazonaws.com";
const btn = document.getElementById("publish");
const out = document.getElementById("result");
btn.addEventListener("click", async () => {
if (API.startsWith("__")) {
out.hidden = false;
out.textContent =
"API endpoint not injected yet — redeploy the site after `terraform apply`.";
return;
}
const eventType = document.getElementById("event-type").value;
const count = Number(document.getElementById("count").value) || 1;
btn.disabled = true;
out.hidden = false;
out.textContent = "Publishing…";
try {
const resp = await fetch(API + "/publish", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
count,
event_type: eventType || undefined,
}),
});
const json = await resp.json();
out.textContent = JSON.stringify(json, null, 2);
} catch (err) {
out.textContent = "Error: " + err;
} finally {
btn.disabled = false;
}
});
add_to_cart
checkout
purchase
Count
Publish test event
Stack
Ingest: Google Pub/Sub
Compute: Apache Beam on Cloud Dataflow (streaming)
Warehouse: BigQuery (partitioned + clustered)
BI: Power BI Service
Edge / DNS: AWS CloudFront + Route 53
Links
Hosted on AWS S3 + CloudFront. Pipeline runs on GCP. ©
Vinh Nguyen.