Can't query on renamed column

If I rename a column I’m not able to use it in a SQL statement. I also can’t use the original column since it’s removed.

@swarren would be great if you could provide an example or some more details.

Sure, the structure in S3 is: 2018/05/03/0_0_0.parquet

The dataset is based on 2018.
dir0 is converted to integer and renamed ‘Month’

select Month from “space”.“dataset” gives a query parse error and turns “Month” red.

Rebuilding the same set but without renaming dir0 to Month works fine.

Thanks for the details! For Parquet file based datasets, you actually do not need to convert/use dir0, dir1, etc. to achieve partition pruning. Do you have the partition columns included within the Parquet files? See last paragraph here.

Otherwise, could you share a query profile of the failing query?

I don’t include the partition columns within the parquet files. Since I’m getting a parsing error on the query I don’t know how to get a query profile of it. I can do a query profile of a Select * query I suppose.

Reproduction should be easy though, just rename dir0 and try to use it in a query. Since I’m just learning Dremio I don’t think I’m doing anything tricky.

Please put Month in double quotes: "Month" since Month is a reserved word


@yufeldman beat me to it. Here are all the reserved words:

1 Like


Thanks for the insight. Perhaps the parsing error message can be more specific over time. :slight_smile: