K.N. Bhargav
06/28/2022, 5:18 AMcurl -X POST "<http://localhost:9000/tableConfigs>" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"tableName\": \"transcript\", \"segmentsConfig\" : { \"timeColumnName\": \"timestampInEpoch\", \"timeType\": \"MILLISECONDS\", \"replication\" : \"1\", \"schemaName\" : \"transcript\" }, \"tableIndexConfig\" : { \"invertedIndexColumns\" : [], \"loadMode\" : \"MMAP\" }, \"tenants\" : { \"broker\":\"DefaultTenant\", \"server\":\"DefaultTenant\" }, \"tableType\":\"OFFLINE\", \"metadata\": {}}"
but getting the following error
{
"_code": 400,
"_error": "Invalid TableConfigs. Missing required creator property 'schema' (index 1)\n at [Source: (String)\"{\n \"tableName\": \"transcript\",\n \"segmentsConfig\" : {\n \"timeColumnName\": \"timestampInEpoch\",\n \"timeType\": \"MILLISECONDS\",\n \"replication\" : \"1\",\n \"schemaName\" : \"transcript\"\n },\n \"tableIndexConfig\" : {\n \"invertedIndexColumns\" : [],\n \"loadMode\" : \"MMAP\"\n },\n \"tenants\" : {\n \"broker\":\"DefaultTenant\",\n \"server\":\"DefaultTenant\"\n },\n \"tableType\":\"OFFLINE\",\n \"metadata\": {}\n}\"; line: 19, column: 1] (through reference chain: org.apache.pinot.spi.config.TableConfigs[\"schema\"])"
}
I don’t want to execute stuff from the CLI in order to add a table config as shown here. Can someone help me in understanding where I’m going wrong and what’s the right request structure / way to do this via the REST API?Neha Pawar
K.N. Bhargav
06/28/2022, 6:52 AM