kaskada
kaskada copied to clipboard
bug: Hello World pipeline example does not work (CLI & Jupyter)
Description The provided example in the 4th query on the Hello World CLI public documentation does not work. This example:
# How many big purchases happen each hour and where?
let cadence = hourly()
# Anything can be named and re-used
let hourly_big_purchases = purchase
| when(Purchase.amount > 10)
# Filter anywhere
| count(window=since(cadence))
# Aggregate anything
| when(cadence)
# Shift timelines relative to each other
let purchases_now = count(Purchase)
let purchases_yesterday =
purchases_now | shift_by(days(1))
# Records are just another type
in { hourly_big_purchases, purchases_in_last_day: purchases_now - purchases_yesterday }
| extend({
# …modify them sequentially
last_visit_region: last(Pageview.region)
})
To Reproduce Steps to reproduce the behavior:
- Follow the steps in the onboarding CLI hello world doc: https://kaskada.io/docs-site/kaskada/main/getting-started/hello-world-cli.html#querying-data
Actual Behavior This error is returned:
Executing query...
state: STATE_FAILURE
config:
dataTokenId: 6c2ac48f-6490-41cb-a146-23800d901562
analysis: {}
fenlDiagnostics:
fenlDiagnostics:
- severity: SEVERITY_ERROR
code: E0006
message: Unbound reference
formatted: |+
error[E0006]: Unbound reference
--> Query:5:28
|
5 | let hourly_big_purchases = purchase
| ^^^^^^^^ No reference named 'purchase'
|
= Nearest matches: 'Purchase', 'cadence'
- severity: SEVERITY_ERROR
code: E0006
message: Unbound reference
formatted: |+
error[E0006]: Unbound reference
--> Query:23:27
|
23 | last_visit_region: last(Pageview.region)
| ^^^^^^^^ No reference named 'Pageview'
|
= Nearest matches: 'cadence', 'Purchase', '$input', 'purchases_now', 'purchases_yesterday'
numErrors: "2"
metrics: {}
requestDetails:
requestId: 1dce10248b88c9b3a04bf6fe7fbec104
Expected Behavior The query runs and I understand what's happening.
Additional context N/A
Relevant Logs / Links N/A
Note that the first error will be fixed by #328, but the 2nd error still needs to be looked into
Note that this issue is not specific to the CLI getting-started. It is also present in the python/jupyter getting started: https://kaskada.io/docs-site/kaskada/main/getting-started/hello-world-jupyter.html