Class ScriptFactory


  • public class ScriptFactory
    extends Object
    Factory for creating DML and PYDML Script objects from strings, files, URLs, and input streams.
    • Constructor Detail

      • ScriptFactory

        public ScriptFactory()
    • Method Detail

      • dmlFromFile

        public static Script dmlFromFile​(String scriptFilePath)
        Create a DML Script object based on a string path to a file.
        Parameters:
        scriptFilePath - path to DML script file (local or HDFS)
        Returns:
        DML Script object
      • dmlFromInputStream

        public static Script dmlFromInputStream​(InputStream inputStream)
        Create a DML Script object based on an input stream.
        Parameters:
        inputStream - input stream to DML
        Returns:
        DML Script object
      • dmlFromLocalFile

        public static Script dmlFromLocalFile​(File localScriptFile)
        Creates a DML Script object based on a file in the local file system. To create a DML Script object from a local file or HDFS, please use dmlFromFile(String).
        Parameters:
        localScriptFile - the local DML file
        Returns:
        DML Script object
      • dmlFromString

        public static Script dmlFromString​(String scriptString)
        Create a DML Script object based on a string.
        Parameters:
        scriptString - string of DML
        Returns:
        DML Script object
      • dmlFromUrl

        public static Script dmlFromUrl​(String scriptUrlPath)
        Create a DML Script object based on a URL path.
        Parameters:
        scriptUrlPath - URL path to DML script
        Returns:
        DML Script object
      • dmlFromUrl

        public static Script dmlFromUrl​(URL scriptUrl)
        Create a DML Script object based on a URL.
        Parameters:
        scriptUrl - URL to DML script
        Returns:
        DML Script object
      • dmlFromResource

        public static Script dmlFromResource​(String resourcePath)
        Create a DML Script object based on a resource path.
        Parameters:
        resourcePath - path to a resource on the classpath
        Returns:
        DML Script object
      • dml

        public static Script dml​(String scriptString)
        Create a DML Script object based on a string.
        Parameters:
        scriptString - string of DML
        Returns:
        DML Script object