Skip to content

Instantly share code, notes, and snippets.

@oleg-agapov
Created October 2, 2023 15:18
Show Gist options
  • Save oleg-agapov/80ebcd8cdee4397d1d7df4f291c109ae to your computer and use it in GitHub Desktop.
Save oleg-agapov/80ebcd8cdee4397d1d7df4f291c109ae to your computer and use it in GitHub Desktop.
import json
def read_json(filename='data.json'):
with open(filename,'r') as f:
data = json.loads(f.read())
return data
def write_json(data, filename='data.json'):
with open(filename,'w') as f:
json.dump(data, f, indent=4)
if __name__ == '__main__':
data = read_json('manifest.json')
for macro in data['macros']:
if 'dbt_utils' in macro:
data['macros'][macro]['docs']['show'] = False
write_json(data, 'manifest.json')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment