Dear Student,
The mixture of CaC​2 and N2 is called calcium cyanamide(CaCN2).
For the preparation of this compound, carbide powder is heated at about 1000oC in an electric furnace into which nitrogen gas is passed for several hours. The product is cooled to ambient temperatures and any unreacted carbide is leached out with water.
CaC2 + N2 = CaCN2 + C
The reaction is conducted in large steel chambers. An electric carbon element heats the reactants to red heat. Nitrogen gas is pressurised at 2 atmospheres.
Regards