Whisk the all-purpose flour and the salt.
Whisk the eggs together in a separate small bowl and then stir them into the flour mixture.
Add the canola oil and pumpkin and use a wooden spoon to mix everything together into a smooth dough.
Cover the bowl and store in a warm place for 20 minutes.
Heat the two tablespoons of unsalted butter in a skillet or frying pan. Add the onions and sauté.
Add the sugar and season with salt and freshly ground black pepper. Sauté the onions until browned. Remove from pan and set aside in a warm place.
Retrieve the dough from its warm place. Use a spätzle press or colander to squeeze the dough through the holes into the boiling salted water.
Fill a separate bowl with ice cold water. Immersing the cooked spätzle in cold water helps it retain its light orange color.
The spätzle will sink to the bottom of the pan. When the spätzle floats up to the top, use a slotted spoon to remove it from the boiling water and transfer the cooked spätzle to the bowl with the cold water.
When all of the spätzle has been boiled and transferred to the cold water, drain the cooked spätzle into a colander and shake off the excess water.
Preheat the oven to 375 degrees F. Grease a small casserole dish and set aside.
Heat the remaining tablespoon of butter in a separate large skillet. Add the drained spätzle and heat, stirring to coat.
Add 1 cup of the shredded Jarlsberg cheese to the pan, stir to combine and heat until everything is the same temperature 3-4 minutes. Use a metal spatula to scrape off any cheese that sticks to the bottom of the pan.
Transfer the spätzle to the prepared greased casserole dish. Sprinkle the remaining 1/2 cup of Jarlsberg cheese over the top.
Place in the oven and bake for 10 minutes. Remove from oven, let cool for 10 minutes before serving.
*For the roasted pumpkin purée: