'PartiQL / Redshift Unnesting Super Data Type with SQLAlchemy

I am trying to create a query using SQLAlchemy for my redshift table. I need to be able to unnest my super data type column / use partiql with sqlalchemy. I am having a hard time figuring out how to add the unnesting.

This is what the query should look like (simple example) -

SELECT * FROM table AS t,
t.nestedCol AS col
WHERE col = 1

Preferably would like to not handle this using raw sql, because I would like the benefits that come with using the ORM

Any help would be greatly appreciated. Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source