I just spent over an hour trying to figure out why my data tables were correct but I was getting an error about an attribute key not being found (i.e. an unlinkable foreign key). I finally figured out that processing one dimension at a time before processing the cube can get fix whatever is out of sync. [Right-click on the dimension in Solution Explorer to process it separately.]