AnishKanth commented on issue #4603: Can not find a deserializer for 
non-concrete Map type
URL: 
https://github.com/apache/incubator-pinot/issues/4603#issuecomment-534986977
 
 
   > I'm still looking into this issue of POSTing data.
   > Meanwhile there is a workaround by dumping the schema into a file and 
upload the schema file.
   > Below is an example code snippet in python:
   > 
   > ```python
   > import json
   > temp_schema_path='/tmp/sample_schema.json'
   > schema_payload = { "schemaName": "transcript", "dimensionFieldSpecs": [ { 
"name": "studentID", "dataType": "STRING" }, { "name": "firstName", "dataType": 
"STRING" }, { "name": "lastName", "dataType": "STRING" }, { "name": "gender", 
"dataType": "STRING" }, { "name": "subject", "dataType": "STRING" } ], 
"metricFieldSpecs": [ { "name": "score", "dataType": "FLOAT" } ] }
   > 
   > with open(temp_schema_path, 'w') as fp:
   >     json.dump(schema_payload, fp)
   > 
   > 
   > import requests
   > url_origin = "http://localhost:9000/schemas";
   > with open(temp_schema_path, 'rb') as f:
   >     r = requests.post(url_origin, files={'sample_schema.json': f})
   >     print(r.status_code)
   > ```
   
   Now I can able to upload the schema through API itself.. Thanks a lot 
@fx19880617 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to