:wave: Hello, team! I’m trying the <transcript exa...
# getting-started
k
👋 Hello, team! I’m trying the transcript example out and trying to upload the table config via the following curl call
Copy code
curl -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
Copy code
{
  "_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?
n
The API you're using is incorrect. You need to use the /tables and /schemas
k
@Neha Pawar my bad, using /tables totally worked. Thank you 🙇‍♂️
👌 1