Not able to rename the dimension during ingestion time

I am not able to rename a dimension during ingestion time … Sample dimensionsSpec is as below

“dimensionsSpec” : {

“dimensions” : [


{ “type” : “default”, “dimension” : “dim3”, “outputName”: “dim3_renamed”, “name”: “dim3”},

{ “type” : “default”, “dimension” : “dim4”, “outputName”: “dim4_renamed”, “name”: “dim3”}



If I don’t give “name” then it gives error. With “name” ingestion goes fine but dimension is not renamed.

Any help on this?

Thanks in advance

  • Mohan

Anyone has any idea what mistake I am doing here? I am kind of stuck here. Thanks in advance

I am still stuck at the same issue. Any help is appreciated … Thanks

This always confuses me as well but Druid has 2 different dimensions specs.
You have the one used when running a query, this one supports renaming:
And you have the one used for indexing, which only supports a name and type:

If you are ingesting CSV or TSV you can just rename the dimensions in the columns list already.
If you are ingesting JSON you can use the flatten spec to rename dimensions:
So you would use:

    "type": "path",
    "name": "dim3_renamed",
    "expr": "$.dim3"

Thanks Erik. It worked. I am using CSV so changed in the columns list itself and it worked.

Thanks once again