Skip to content

Instantly share code, notes, and snippets.

@OneCricketeer
Created December 3, 2018 19:08
Show Gist options
  • Save OneCricketeer/6432bc1eed0cf57bb3df00bf7daf062b to your computer and use it in GitHub Desktop.
Save OneCricketeer/6432bc1eed0cf57bb3df00bf7daf062b to your computer and use it in GitHub Desktop.
Flatten a Kafka Connect Distributed JSON Config to Java Properties format for Kafka Connect Standalone
#!/usr/bin/env python
import sys
import json
with open(sys.argv[1]) as f:
data = json.load(f)
name, config = data['name'], data['config']
print("name=" + name)
for k,v in config.items():
if k == "__comment":
continue
else:
print("{}={}".format(k,v))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment