Created
December 3, 2018 19:08
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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