Preheat the oven to 200°C (390°F). Line a baking sheet with parchment paper.
In a large bowl, cream together butter and sugar until pale and fluffy.
Gradually add the beaten eggs and sour cream, mixing until well combined.
In another bowl, mix the flour, baking powder, and salt.
Add the dry ingredients to the wet mixture and mix until a soft dough forms. Avoid overmixing.
Flatten the dough, wrap in plastic wrap, and refrigerate while you prepare the filling.
In a mixing bowl, mash the farmer’s cheese using a fork or potato masher.
Add the egg, sugar, flour, and optional vanilla. Stir until the mixture is smooth but spreadable.
Roll out the chilled dough to about ½ cm (⅕ in) thick. Cut into 8 rounds, about 10 cm (4 in) wide.
Spoon the cheese filling onto one side of each circle. Fold the dough over without sealing completely.
Transfer to the baking sheet. Brush each pastry with egg yolk.
Bake for 18–20 minutes until golden and slightly puffed.
Let cool slightly and serve warm or at room temperature. Optionally dust with powdered sugar.