use lambda function to get layer primary key