Class ExternalTableUtils


  • public final class ExternalTableUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getLocationSQL()
      Get LOCATION clause information from the ALL_EXTERNAL_LOCATIONS dictionary view.
      static java.lang.String getWriteFileSQL()  
      static java.lang.String[] splitTableName​(java.lang.String tableAndSchemaName, java.lang.String defaultSchemaName)
      Return the components of a schema qualified table name.
      static void validateTableName​(java.lang.String tableName)
      Validate the schema qualified table name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • WRITE_FILE_RESOURCE_NAME

        public static final java.lang.String WRITE_FILE_RESOURCE_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • validateTableName

        public static void validateTableName​(java.lang.String tableName)
                                      throws ExternalTableException
        Validate the schema qualified table name. The format is [schema.]tableName.
        Throws:
        ExternalTableException
      • splitTableName

        public static java.lang.String[] splitTableName​(java.lang.String tableAndSchemaName,
                                                        java.lang.String defaultSchemaName)
        Return the components of a schema qualified table name.
        Parameters:
        tableAndSchemaName - schema qualified table name to be split into schema and table name components.
        Returns:
        a String[2] containing the schema name ([0]) and table name ([1]), or null if the tableName does not match the expected pattern specified by TABLE_PATTERN.
      • getLocationSQL

        public static java.lang.String getLocationSQL()
        Get LOCATION clause information from the ALL_EXTERNAL_LOCATIONS dictionary view. OWNER is a bind variable. The directory_path is fetched for debugging.
      • getWriteFileSQL

        public static java.lang.String getWriteFileSQL()
                                                throws java.io.IOException
        Throws:
        java.io.IOException