GitHub user mastavichus-vp created a discussion: Operations on original columns
in SQL-SELECT-JOIN query from different databases using the "superset://"
connection
Is there any way to transform the original column values in queries from a
several different databases by from type super-connection "Superset meta
database" with SQLAlchemy URI "superset://"?
First of all, necessary conversion to a string type is necessary for performing
comparisons in a query with JOIN.
In superset_config.py:
```
FEATURE_FLAGS = {
...
ENABLE_SUPERSET_META_DB=True,
...
}
```
Tried syntaxes unsuccessfully,
postgres
```
select to_char(a.dt, 'YYYY-MM-DD') as dt2, a.* from "pg1.synth.t1" a;
select a.dt::text as dt2, a.* from "pg1.synth.t1" a;
```
jinja
`select {{ a.dt }} as dt2, a.* from "pg1.synth.t1" a;
`
python
`select str(a.dt) as dt2, a.* from "pg1.synth.t1" a;
`
javascript
`select (a.dt).toString() as dt2, a.* from "pg1.synth.t1" a;`
GitHub link: https://github.com/apache/superset/discussions/35173
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]