below is csv file.
csv file:
STATE,place,populationmales,populationfemales,literatemales,literatefemales
JAMMU & KASHMIR,Urban,1855942,1558164,1386708,960337
Kupwara,Rural,418370,357952,245342,148633
Kupwara,Urban,56756,42486,39055,21046
Query:
select `state`,sum(`populationmales`) from dfs.`/Users/ks1162/Documents/pmv.csv` GROUP BY `state`;
When i query sum of 'populationmales' which is not a varchar type still getting error
error:
UNSUPPORTED_OPERATION ERROR: Only COUNT, MIN and MAX aggregate functions supported for VarChar type
Below is configuration of csv file in storage plugin:
"csv": {
"type": "text",
"extensions": [
"csv"
],
"extractHeader": true,
"delimiter": ","
},