Several measurements of B meson decay observables show deviations from Standard Model predictions, some of them implying a violation of lepton flavour universality (LFU). I show how the anomalies in rare B meson decays can be explained by partial compositeness. Partial compositeness is a key ingredient of models with a composite Higgs boson and generically leads to violation of LFU. After presenting a simple model able to explain the anomalies in rare B decays by partial compositeness, I will discuss the flavour physics of a minimal UV completion of a composite Higgs model with partial compositeness: the minimal fundamental partial compositeness (MFPC) model. A virtue of MFPC is its capability of serving both as a solution to the naturalness problem of the Standard Model and as an explanation for the flavour anomalies in rare B meson decays. Any model that explains the flavour anomalies generically leads to deviations from the Standard model predictions for other precisely measured observables. Testing the validity of such a model thus requires considering a large number of observables. To make this task more efficient, effective field theories can be employed in an intermediate step. I will present a global likelihood for the Standard Model Effective Field Theory (SMEFT) that takes into account many electroweak precision observables and low energy flavour observables, 257 in total, and can be used both for model-independent fits and to test models aiming at explaining the flavour anomalies.