1. dissolve methyl 5-methyl-1H-pyrazole-3-carboxylate (6.8 kg) in N,N-dimethylformamide (DMF, 8 L).
2. dimethyl sulfate (6.0 L) was slowly added dropwise over a period of 3 h. The rate of dropwise acceleration was controlled to maintain the reaction temperature at no more than 90°C.
3. After completion of the dropwise addition, the reaction mixture was heated and stirred at 80 °C for 18 hours.
4. After completion of the reaction, the mixture was cooled to room temperature, ice (3.4 kg) was added and further cooled in an ice bath.
5. 28% aqueous ammonium hydroxide solution (8.6 L) was slowly added to the reaction mixture over a period of 3 hours.
6. The resulting mixture was stirred for 18 hours and then diluted with ethyl acetate (12 L) and water (16 L), extracted and the organic layer was separated.
7. The organic layer was washed with water (4 L), dried over anhydrous magnesium sulfate, filtered and concentrated under reduced pressure to give the crude product of methyl 1,3-dimethyl-1H-pyrazole-5-carboxylate (5.14 kg, yield 69%, HPLC purity >90%).
8. The crude product was used directly in the subsequent reaction without further purification.