I can't specifically answer Viya questions ... however, I can answer PCA questions. When you perform PCA on a training data set, the exact same scaling must be used on the test data set. If the mean of X1 is 14 in the training data set and the standard deviation of X1 is 2.7 in the training data set, then these values must be used to scale the test data X1 as well.
Also, please note: The method of using PCA before a predictive model isn't optimal. PCA can find vectors that are not very predictive. If you use Partial Least Squares analysis, this produces "PCA-like" vectors that designed to be predictive of whatever Y variable(s) you have, as predictability is the criterion that PLS optimizes.
--
Paige Miller