def select_columns()

in services/ui_backend_service/data/db/tables/run.py [0:0]


    def select_columns(self):
        # NOTE: We must use a function scope in order to be able to access the table_name variable for list comprehension.
        # User should be considered NULL when 'user:*' tag is missing
        # This is usually the case with AWS Step Functions
        return (
            [
                "{table_name}.{col} AS {col}".format(table_name=self.table_name, col=k)
                for k in self.keys
            ]
            + [
                """
                (CASE
                    WHEN system_tags ? ('user:' || user_name)
                    THEN user_name
                    ELSE NULL
                END) AS user"""
            ]
            + [