The problem of learning from demonstration in the case of partially observable external task parameters is addressed in this paper. Such a situation could be present in the daily life scenarios, where information regarding some task parameters are missing or partially available. In the first step, one dynamic movement primitives (DMP) model is learned for each demonstration trajectory. The parameters of the learned DMP model are recorded together with the corresponding external task parameters (query points), to create a database. Then Gaussian process regression (GPR) is used to create a model for the external task parameters and the DMP parameters. During reproduction, DMP parameters are retrieved by providing the new external task parameters and are used to regenerate the trajectory. It is shown how the learning approach could be adapted to deal with the partially observable external task parameters and regenerate the proper trajectory. The proposed methodology is applied to learn a via-point passing experiment with a lightweight robot manipulator (KUKA robot) to illustrate the efficacy of the proposed approach.