Skip to content

Instantly share code, notes, and snippets.

@carlosalbaladejo
Last active May 18, 2021 09:41
Show Gist options
  • Save carlosalbaladejo/9d03b349c4122953a843f03c2c2d1d5d to your computer and use it in GitHub Desktop.
Save carlosalbaladejo/9d03b349c4122953a843f03c2c2d1d5d to your computer and use it in GitHub Desktop.
logs ingestion
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"width": 600,
"height": 400,
"data": {
"url": "https://api.tinybird.co/v0/sql?q=SELECT%20ts%2C%20rows%20FROM%20rt_ingestion%20%0Awhere%20rows%20is%20not%20null%0Aand%20ts%20%3E%20now()%20-%20INTERVAL%201%20day%20FORMAT%20CSVWithNames&token=p.eyJ1IjogImM3NjkwNTQzLThjZTAtNDE2OC04NmQwLTNhMjgwNDE1NzdmOSIsICJpZCI6ICIxY2FhZTExYS05NWU5LTRiN2YtOThhZi1lZjhiY2ViZDE4ZDMifQ.ZM-S6tpGCcdUr_srDfRuSMB8raHeuW8E-NGoeWLL2dc&pipeline=monitoring_ingestion",
"format": {
"type": "csv",
"parse": {
"rows": "number"
}
}
},
"mark": {
"type": "line"
},
"encoding": {
"x": {
"field": "ts",
"type": "temporal",
"title": "ts"
},
"y": {
"title": "rows",
"field": "rows",
"type": "quantitative"
},
"tooltip": [
{
"field": "ts",
"type": "temporal",
"title": "ts",
"timeUnit": "utcyearmonthdatehoursminutes"
},
{
"field": "rows",
"type": "quantitative"
}
]
},
"layer": [
{
"mark": {
"type": "line"
},
"encoding": {
"y": {
"title": "rows",
"field": "rows",
"type": "quantitative"
},
"color": {
"value": "#E58606"
}
}
},
{
"mark": "rule",
"selection": {
"hover": {
"type": "single",
"on": "mouseover",
"empty": "none",
"nearest": true
}
},
"encoding": {
"color": {
"condition": {
"selection": {
"not": "hover"
}
}
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment