Skip to content

Instantly share code, notes, and snippets.

View marcintustin's full-sized avatar

marcintustin

View GitHub Profile
@marcintustin
marcintustin / postgres_queries_and_commands.sql
Last active February 9, 2023 19:19 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show *blocked* queries (not the same as idle)
SELECT
pid,
usename,
pg_stat_activity.query_start,
now() - pg_stat_activity.query_start AS query_time,
query,
state,
wait_event_type,
wait_event
@rmoff
rmoff / Continuous Conversion of Kafka topics from JSON to Avro with KSQL.adoc
Last active August 18, 2023 21:11
Continuous Conversion of Kafka topics from JSON to Avro with KSQL

@rmoff / 04 Apr 2018

This is easy with KSQL :)

Here’s a dummy topic, in JSON:

$ kafka-console-consumer --bootstrap-server localhost:9092 --from-beginning --topic mysql_users
{"uid":1,"name":"Cliff","locale":"en_US","address_city":"St Louis","elite":"P"}