hops-examples icon indicating copy to clipboard operation
hops-examples copied to clipboard

Add a spark or sql transform

Open diogo-lucena-wildlife opened this issue 4 years ago • 1 comments

diogo-lucena-wildlife avatar May 13 '21 23:05 diogo-lucena-wildlife

Is it possible to apply a regular transformation (sql or spark) on a field before aggregating it trough AggregatedTransform?

example: Query is SELECT ... max(case when x = 'xName' then cast(jsonField['fieldA'] as integer) end) as max_fieldA ... from BLA

Ideally I'd like to just select jsonField['fieldA'] on the query and apply the transformation in the feature definition before applying the "max" aggregation

Thans ^^

diogo-lucena-wildlife avatar May 13 '21 23:05 diogo-lucena-wildlife