Project: mule
Issue MULE-8033: DataSense doesn't recognise named columns correctly with MySQL joined queries
As Is: I am using MySQL database connector to issue the following query: Select a.item_id as `parentItemId`, a.item_name as `parentItemName`, c.item_id as `ItemId`, c.item_name as `ItemName`, b.level as `levelId` from item a, item_hierarchy b, item c where a.item_id = b.parent_item_id and b.item_id = c.item_id; The join works as expected as does the MySQL connector by returning the correct data. But DataSense in Studio in Studio in the data preview shows the following structure: Payload > List : List >> item_id : Integer >> item_name : String >> level : String Also leaving out the "as `descriptor`" only shows 3 result columns instead of 5 the query returns. To Be: Studio should show in design mode Payload > List : List >> parentItemId : Integer >> parentItemName : String >> ItemId : Integer >> ItemName : String >> levelId : Integer Mule xml: Select a.item_id as `parentItemId`, a.item_name as `parentItemName`, c.item_id as `ItemId`, c.item_name as `ItemName`, b.level as `levelId` from item a, item_hierarchy b, item c where a.item_id = b.parent_item_id and b.item_id = c.item_id;
Story points: 8