factory command in spark sql