{"action":"closed","issue":{"url":"https://api.github.com/repos/metabase/metabase/issues/2988","repository_url":"https://api.github.com/repos/metabase/metabase","labels_url":"https://api.github.com/repos/metabase/metabase/issues/2988/labels{/name}","comments_url":"https://api.github.com/repos/metabase/metabase/issues/2988/comments","events_url":"https://api.github.com/repos/metabase/metabase/issues/2988/events","html_url":"https://github.com/metabase/metabase/issues/2988","id":166537126,"number":2988,"title":"MongoDb Lookup Error - Vanishing Column ","user":{"login":"RColaco11","id":20555011,"avatar_url":"https://avatars.githubusercontent.com/u/20555011?v=3","gravatar_id":"","url":"https://api.github.com/users/RColaco11","html_url":"https://github.com/RColaco11","followers_url":"https://api.github.com/users/RColaco11/followers","following_url":"https://api.github.com/users/RColaco11/following{/other_user}","gists_url":"https://api.github.com/users/RColaco11/gists{/gist_id}","starred_url":"https://api.github.com/users/RColaco11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RColaco11/subscriptions","organizations_url":"https://api.github.com/users/RColaco11/orgs","repos_url":"https://api.github.com/users/RColaco11/repos","events_url":"https://api.github.com/users/RColaco11/events{/privacy}","received_events_url":"https://api.github.com/users/RColaco11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/metabase/metabase/labels/Database/Mongo","name":"Database/Mongo","color":"782E40"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-20T09:24:15Z","updated_at":"2016-07-22T09:13:15Z","closed_at":"2016-07-22T09:13:15Z","body":"If this is a bug report, please fill in the blanks:\r\n\r\n*  I am using the Chrome browser.\r\n*  My computer's OS is Windows 8.1.\r\n*  I'm running Metabase on Herkou  and.\r\n*  My data is in a MongoDB database 3.2v. \r\n*  Set up metabse this week, on newest version.\r\n\r\n```\r\n[{\"$project\":{\"fname\":\"$fname\",\"company_id\":\"$company_id\", \"sign_in_count\":\"$sign_in_count\"}},\r\n{\"$project\":{\"_id\":\"$_id\",\"___group\":{\"fname\":\"$fname\",\"company_id\":\"$company_id\",\"sign_in_count\":\"$sign_in_count\"}}},\r\n{\"$group\":{\"_id\":\"$___group\"}},{\"$sort\":{\"_id\":1}},\r\n{\"$project\":{\r\n\"_id\":\"$_id.fname\",\r\n\"company_id\":\"$_id.company_id\", \r\n\"sign_in_count\":\"$_id.sign_in_count\"}},{\"$sort\":{\"sign_in_count\":1,\"company_id\":1, \"fname\":1}},\r\n\r\n{ \"$lookup\": { \"from\": \"companies\", \"localField\": \"company_id\", \"foreignField\": \"_id\", \"as\": \"company_array\" } }, \r\n{ \"$unwind\" : \"$company_array\"},\r\n{ \"$project\": {\"Name\":\"$company_array.name\"}} ]\r\n```\r\nIf I remove the look up the result shows all three columns; Fname, Company_ID, and Sign in count.\r\nHowever I want instead of Company ID to be company name which is in the companies table. Using lookup to get the company name removes the sign in count column from the results. \r\nSo the results contain Company Name and Fname when the lookup section of code is included. \r\n\r\nI believe the sign in count data is still in the table becuase I can sort by sign in count correctly also, it is just hidden. \r\n"}}
{"actor":{"display_login":"RColaco11"}}