/** * Saves partitioning properties in the repository for the given step. * * @param meta * the partitioning metadata to store. * @param id_transformation * the ID of the transformation * @param id_step * the ID of the step * @throws KettleDatabaseException * In case anything goes wrong * */ public void saveStepPartitioningMeta( StepPartitioningMeta meta, ObjectId id_transformation, ObjectId id_step ) throws KettleException { repository.saveStepAttribute( id_transformation, id_step, "PARTITIONING_SCHEMA", meta.getPartitionSchema() != null ? meta .getPartitionSchema().getName() : "" ); // selected schema repository.saveStepAttribute( id_transformation, id_step, "PARTITIONING_METHOD", meta.getMethodCode() ); if ( meta.getPartitioner() != null ) { meta.getPartitioner().saveRep( repository, id_transformation, id_step ); } }
public void testRepoRoundTrip() throws KettleException { T metaToSave = createMeta(); Map<String, FieldLoadSaveValidator<?>> validatorMap = createValidatorMapAndInvokeSetters( repoAttributes, metaToSave ); T metaLoaded = createMeta(); Repository rep = new MemoryRepository(); metaToSave.saveRep( rep, null, null ); metaLoaded.loadRep( rep, null ); validateLoadedMeta( repoAttributes, validatorMap, metaToSave, metaLoaded ); }
DataNode partitionerCustomNode = new DataNode( NODE_PARTITIONER_CUSTOM ); proxy = new RepositoryProxy( partitionerCustomNode ); partitioningMeta.getPartitioner().saveRep( proxy, null, null ); stepNode.addNode( partitionerCustomNode );