Package com.exasol

Interface ExaImportSpecification


  • public interface ExaImportSpecification
    This class holds all information about a user-defined IMPORT, which can be started using the IMPORT FROM SCRIPT ... statement.

    To support a user defined IMPORT you can implement the callback method generateSqlForImportSpec(ExaImportSpecification importSpec). Please refer to the Exasol online guide for more details.

    • Method Detail

      • isSubselect

        boolean isSubselect()
        Check whether the IMPORT is part of a sub-select statement.
        Returns:
        true, if the import is used inside a SELECT statement (i.e. not inside an IMPORT INTO table statement)
      • getSubselectColumnNames

        List<String> getSubselectColumnNames()
        Get the names of the target columns in a sub-select scenario.

        Use isSubselect() to check whether the import is part of a sub-select first.

        Returns:
        List of names of the specified target columns or empty list
      • getSubselectColumnSqlTypes

        List<String> getSubselectColumnSqlTypes()
        Get the data types of the target columns in a sub-select.

        Use isSubselect() to check whether the import is part of a sub-select first.

        The types are returned in SQL format (e.g. VARCHAR(100)).

        Returns:
        List of names of the specified target columns or empty list
      • hasConnectionName

        boolean hasConnectionName()
        Check whether the name of a connection is specified that the import should use.

        If so, you can get the connection information by calling ExaMetadata.getConnection(String).

        Returns:
        true, if the name of a connection was specified
      • getConnectionName

        String getConnectionName()
        Get the name of the connection to be used for the import.

        Use hasConnectionName() to find out if the connection was specified in the IMPORT statement.

        Returns:
        name of the connection, if one was specified or otherwise null
      • hasConnectionInformation

        boolean hasConnectionInformation()
        Check whether the details of a connection are specified that the import should use.

        If so, you can get the connection information by calling ExaMetadata.getConnection(String).

        Returns:
        true, if connection information were provided.
      • getConnectionInformation

        ExaConnectionInformation getConnectionInformation()
        Get the connection details from the connection if one is specified for the import.
        Returns:
        connection information
      • getParameters

        Map<String,​String> getParameters()
        Get the parameters specified in the IMPORT statement.
        Returns:
        parameters specified in the IMPORT statement