This cohort study compares the incidence of atrial fibrillation in patients with type 2 diabetes associated with use of sodium-glucose cotransporter-2 inhibitors with dipeptidyl peptidase-4 inhibitors or glucagonlike peptide-1 receptor agonists. The gene discussed is DPP4; the disease is type 2 diabetes mellitus.