only add "key:" prefix to fields[] but not to combined_schema (#360)

The combined_schema.keySchema will not need the "key:" prefix for Espresso
This commit is contained in:
Eric Sun 2017-03-23 22:40:52 -07:00 committed by Mars Lan
parent 1efa4eef16
commit eee2fbf230

View File

@ -77,8 +77,9 @@ class EspressoTransform:
key_list = json.loads(doc['key']) key_list = json.loads(doc['key'])
fields = [] fields = []
for key_field in key_list: for key_field in key_list:
key_field['name'] = 'key:' + key_field['name'] key_field_with_prefix = key_field.copy()
fields.extend(key_field) key_field_with_prefix["name"] = 'key:' + key_field_with_prefix["name"]
fields.append(key_field_with_prefix)
properties = {} properties = {}
for p_key in content.keys(): for p_key in content.keys():