engine: hide NULL values of json dimensions in inline join table (#38067)
This commit is contained in:
parent
4701568437
commit
d603f14860
|
@ -259,8 +259,13 @@ class EngineCube(object):
|
|||
json_key = name[5:]
|
||||
return schemas.Join(
|
||||
name=name,
|
||||
table='(SELECT DISTINCT %s.%s->>\'%s\' AS value FROM %s ORDER BY value)' % (
|
||||
self.fact_table, self.json_field, json_key, self.fact_table),
|
||||
table=(
|
||||
'(SELECT DISTINCT %s.%s->>\'%s\' AS value FROM %s '
|
||||
'WHERE %s.%s->>\'%s\' IS NOT NULL ORDER BY value)' % (
|
||||
self.fact_table, self.json_field, json_key, self.fact_table,
|
||||
self.fact_table, self.json_field, json_key
|
||||
)
|
||||
),
|
||||
master='%s->>\'%s\'' % (self.json_field, json_key),
|
||||
detail='value',
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue