Schema
run testsunknown
python
a year ago
316 B
1
Indexable
Never
def get_schema_field_names(filename): """Extract the list of fieldNames defined in the schema from a given JSON file.""" with open(filename, 'r') as file: data = json.load(file) schema = data.get("feed", {}).get("catalog", {}).get("schema", []) return [field["fieldName"] for field in schema]