Class TransformMeta

    • Constructor Detail

      • TransformMeta

        public TransformMeta​(String transformId,
                             String transformName,
                             ITransformMeta transform)
        Parameters:
        transformId - The plugin ID of the transform
        transformName - The name of the new transform
        transform - The transform metadata interface to use (TextFileInputMeta, etc)
      • TransformMeta

        public TransformMeta​(String transformName,
                             ITransformMeta transform)
        Parameters:
        transformName - The name of the new transform
        transform - The transform metadata interface to use (TextFileInputMeta, etc)
      • TransformMeta

        public TransformMeta()
    • Method Detail

      • setCopies

        public void setCopies​(int c)
        Sets the number of parallel copies that this transform will be launched with.
        Parameters:
        c - The number of copies.
      • getCopies

        public int getCopies​(IVariables variables)
        Get the number of copies to start of a transform. This takes into account the partitioning logic.
        Returns:
        the number of transform copies to start.
      • equals

        public boolean equals​(Object obj)
        Two transforms are equal if their names are equal.
        Overrides:
        equals in class Object
        Returns:
        true if the two transforms are equal.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • hasChanged

        public boolean hasChanged()
      • setChanged

        public void setChanged​(boolean ch)
      • setChanged

        public void setChanged()
      • chosesTargetTransforms

        public boolean chosesTargetTransforms()
      • replaceMeta

        public void replaceMeta​(TransformMeta transformMeta)
      • setTransform

        public void setTransform​(ITransformMeta transform)
      • getTransformPluginId

        public String getTransformPluginId()
      • setName

        public void setName​(String sname)
      • setDescription

        public void setDescription​(String description)
      • flipSelected

        public void flipSelected()
      • setTerminator

        public void setTerminator()
      • setTerminator

        public void setTerminator​(boolean t)
      • hasTerminator

        public boolean hasTerminator()
      • isPartitioned

        public boolean isPartitioned()
        Returns:
        true is the transform is partitioned
      • isTargetPartitioned

        public boolean isTargetPartitioned()
        Returns:
        true is the transform is partitioned
      • getTransformPartitioningMeta

        public TransformPartitioningMeta getTransformPartitioningMeta()
        Returns:
        the transformPartitioningMeta
      • setTransformPartitioningMeta

        public void setTransformPartitioningMeta​(TransformPartitioningMeta transformPartitioningMeta)
        Parameters:
        transformPartitioningMeta - the transformPartitioningMeta to set
      • isDistributes

        public boolean isDistributes()
        Returns:
        the distributes
      • setDistributes

        public void setDistributes​(boolean distributes)
        Parameters:
        distributes - the distributes to set
      • getTransformErrorMeta

        public TransformErrorMeta getTransformErrorMeta()
        Returns:
        the TransformErrorMeta error handling metadata for this transform
      • setTransformErrorMeta

        public void setTransformErrorMeta​(TransformErrorMeta transformErrorMeta)
        Parameters:
        transformErrorMeta - the error handling metadata for this transform
      • findTransform

        public static final TransformMeta findTransform​(List<TransformMeta> transforms,
                                                        String transformName)
        Find a transform with its name in a given ArrayList of transforms
        Parameters:
        transforms - The List of transforms to search
        transformName - The name of the transform
        Returns:
        The transform if it was found, null if nothing was found
      • supportsErrorHandling

        public boolean supportsErrorHandling()
      • isDoingErrorHandling

        public boolean isDoingErrorHandling()
        Returns:
        if error handling is supported for this transform, if error handling is defined and a target transform is set
      • isSendingErrorRowsToTransform

        public boolean isSendingErrorRowsToTransform​(TransformMeta targetTransform)
      • getTypeId

        public String getTypeId()
        Support for ICheckResultSource
        Specified by:
        getTypeId in interface IResourceHolder
        Returns:
        JOBENTRY, TRANSFORM, etc.
      • getPluginId

        public String getPluginId()
        Specified by:
        getPluginId in interface IResourceHolder
        Returns:
        The Type ID of the resource holder. The Type ID is the system-defined type identifier (like PIPELINE or SORT).
      • isMapping

        public boolean isMapping()
      • isSingleThreader

        public boolean isSingleThreader()
      • isEtlMetaInject

        public boolean isEtlMetaInject()
      • isWorkflowExecutor

        public boolean isWorkflowExecutor()
      • isMappingInput

        public boolean isMappingInput()
      • isMappingOutput

        public boolean isMappingOutput()
      • getResourceDependencies

        public List<ResourceReference> getResourceDependencies​(IVariables variables)
        Get a list of all the resource dependencies that the transform is depending on.
        Returns:
        a list of all the resource dependencies that the transform is depending on
      • exportResources

        public String exportResources​(IVariables variables,
                                      Map<String,​ResourceDefinition> definitions,
                                      IResourceNaming iResourceNaming,
                                      IHopMetadataProvider metadataProvider)
                               throws HopException
        Description copied from interface: IResourceExport
        Exports the object to a flat-file system, adding content with filename keys to a set of definitions. The supplied resource naming interface allows the object to name appropriately without worrying about those parts of the implementation specific details.
        Specified by:
        exportResources in interface IResourceExport
        Parameters:
        variables - The variable variables to resolve (environment) variables with.
        definitions - The map containing the filenames and content
        iResourceNaming - The resource naming interface allows the object to name appropriately
        metadataProvider - the central metadata to load non-hop specific metadata from
        Returns:
        The filename for this object. (also contained in the definitions map)
        Throws:
        HopException - in case something goes wrong during the export
      • getTargetTransformPartitioningMeta

        public TransformPartitioningMeta getTargetTransformPartitioningMeta()
        Returns:
        the targetTransformPartitioningMeta
      • setTargetTransformPartitioningMeta

        public void setTargetTransformPartitioningMeta​(TransformPartitioningMeta targetTransformPartitioningMeta)
        Parameters:
        targetTransformPartitioningMeta - the targetTransformPartitioningMeta to set
      • isRepartitioning

        public boolean isRepartitioning()
      • setTransformPluginId

        public void setTransformPluginId​(String transformPluginId)
        Set the plugin transform id (code)
        Parameters:
        transformPluginId -
      • setParentPipelineMeta

        public void setParentPipelineMeta​(PipelineMeta parentPipelineMeta)
      • getParentPipelineMeta

        public PipelineMeta getParentPipelineMeta()
      • setRowDistribution

        public void setRowDistribution​(IRowDistribution rowDistribution)
      • getCopiesString

        public String getCopiesString()
        Returns:
        the copiesString
      • setCopiesString

        public void setCopiesString​(String copiesString)
        Parameters:
        copiesString - the copiesString to set
      • isMissing

        public boolean isMissing()
      • isDeprecated

        public boolean isDeprecated()
      • getSuggestion

        public String getSuggestion()