Worked with data a lot for today, fetched some metrics realted to a deployed app on azure like api calls, db connections, queries and active user count. In that process, worked with azure portal created and learned about queries to be performed on the platform for fetching metrics, newrelic NRQL queries and dashboard first time interaction. Also did a litle sql and django query building for those metrics(db connections).
- Worked with Metrics for some app
- SQL queries for active connections(postgres db)
- Django and SQL query for current active users in system
- Azure Dashboard for query with metirc analysis
- Newrelic NRQL Queries
- Docker TUI with textual (bug for container id and name parsing)
- Blog TUI with textual (base layout with rss feed link)
TIL
-
NRQL, a SQL like query language for newrelic metrics. It has powerful syntax like fetching and grouping data with time
since,agoand smart types likeweek,days, other functions likeratehandy for average calculation(I used for getting average of db hits per week over 5 weeks),uniqueCount, etc. -
Custom User Defined Functions in SQL (UDF)
Dug a bit deep and learnt afresh about UDFs in SQL, understood the four components: name, arguments, return and function body. The actual content that can be returned is a sql query string.
/* create a udf add */
CREATE FUNCTION add(a INT, b INT) RETURNS INT AS 'SELECT a+b, a-b' LANGUAGE SQL
SELECT * FROM add(2, 3)
It returns a single int as defined in the function signature.