Always-prog commented on issue #20790: URL: https://github.com/apache/superset/issues/20790#issuecomment-1225537064
> > The error is solved by changing the method `get_joined_tables` in the file [38_a9422eeaae74_new_dataset_models_take_2.py](https://github.com/apache/superset/blob/master/superset/migrations/versions/2022-04-01_14-38_a9422eeaae74_new_dataset_models_take_2.py) at line 638 by next code: > > ```python > > def get_joined_tables(offset, limit): > > # Import aliased from sqlalchemy > > from sqlalchemy.orm import aliased > > # Create alias of NewColumn > > new_column_alias = aliased(NewColumn) > > # Get subquery and give it the alias "sl_colums_2" > > subquery = session.query(new_column_alias).offset(offset).limit(limit).subquery("sl_columns_2") > > > > return ( > > sa.join( > > subquery, > > dataset_column_association_table, > > # Use column id from subquery > > dataset_column_association_table.c.column_id == subquery.c.id, > > ) > > .join( > > NewDataset, > > NewDataset.id == dataset_column_association_table.c.dataset_id, > > ) > > .join( > > dataset_table_association_table, > > # Join tables with physical datasets > > and_( > > NewDataset.is_physical, > > dataset_table_association_table.c.dataset_id == NewDataset.id, > > ), > > isouter=True, > > ) > > .join(Database, Database.id == NewDataset.database_id) > > .join( > > TableColumn, > > # Use column uuid from subquery > > TableColumn.uuid == subquery.c.uuid, > > isouter=True, > > ) > > .join( > > SqlMetric, > > # Use column uuid from subquery > > SqlMetric.uuid == subquery.c.uuid, > > isouter=True, > > ) > > ) > > ``` > > this query is killing python @snt1017 . Is it working? The same. It is not working for me. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
