Skip to content

Can't use custom columns in NOT GROUPED BY #420

@aquach

Description

@aquach

I've been playing around and familiarizing myself with Caravel for an hour or so, so I might be totally on the wrong track with how I'm using columns and metrics. I can't tell the difference between them: are metrics meant for rollup functions?

Anyways, I have a varchar column date formatted like 2015-01-01 and I created a custom column with an arbitrary SQL expression that transforms it into caravel_date like this: 2015-01-01 00:00:00.000000 so that I can use it in datetime computations. That's worked well, but I can't seem to use it in NOT GROUPED BY: instead of substituting the custom expression instead of the name, it uses the name directly:

SELECT caravel_date FROM transactions 

instead of

SELECT CONCAT(date, ' 00:00:00.000000') FROM transactions

I can use the column in GROUP BY and it works just fine, so this seems like a bug. Thanks for listening!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions