Articles in this section

How to rename dimension during raw data ingestion

The following ingestion spec will help renaming dimension during ingestion while keep its values intact. In this case, original column names are `user` and `regionName`, and after ingestion, the column names are changed to `RENAME_User` and "RENAME_RegionName` in dataSource:

{
  "type" : "index",
  "spec" : {
    "dataSchema" : {
      "dataSource" : "wikipedia-rename",
...
          "dimensionsSpec" : {
            "dimensions" : [ "RENAME_User", .... "RENAME_RegionName", ... ]
          }
        }
      },
...
      "transformSpec" : {
        "filter" : null,
        "transforms" : [ {
          "type" : "expression",
          "name" : "RENAME_User",
          "expression" : "(\"user\")"
        }, {
          "type" : "expression",
          "name" : "RENAME_RegionName",
          "expression" : "(\"regionName\")"
        } ]
      }
    }
...
}
Was this article helpful?
1 out of 1 found this helpful