MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / get_schema_from_json

Function get_schema_from_json

hardness_eval.py:132–142  ·  view source on GitHub ↗
(fpath)

Source from the content-addressed store, hash-verified

130
131
132def get_schema_from_json(fpath):
133 with open(fpath) as f:
134 data = json.load(f)
135
136 schema = {}
137 for entry in data:
138 table = str(entry['table'].lower())
139 cols = [str(col['column_name'].lower()) for col in entry['col_data']]
140 schema[table] = cols
141
142 return schema
143
144
145def tokenize(string):

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected