Package com.exasol
Interface ExaImportSpecification
-
public interface ExaImportSpecificationThis class holds all information about a user-definedIMPORT, which can be started using theIMPORT FROM SCRIPT ...statement.To support a user defined
IMPORTyou can implement the callback methodgenerateSqlForImportSpec(ExaImportSpecification importSpec). Please refer to the Exasol online guide for more details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExaConnectionInformationgetConnectionInformation()Get the connection details from the connection if one is specified for the import.StringgetConnectionName()Get the name of the connection to be used for the import.Map<String,String>getParameters()Get the parameters specified in theIMPORTstatement.List<String>getSubselectColumnNames()Get the names of the target columns in a sub-select scenario.List<String>getSubselectColumnSqlTypes()Get the data types of the target columns in a sub-select.booleanhasConnectionInformation()Check whether the details of a connection are specified that the import should use.booleanhasConnectionName()Check whether the name of a connection is specified that the import should use.booleanisSubselect()Check whether theIMPORTis part of a sub-select statement.
-
-
-
Method Detail
-
isSubselect
boolean isSubselect()
Check whether theIMPORTis part of a sub-select statement.- Returns:
true, if the import is used inside aSELECTstatement (i.e. not inside anIMPORT INTOtable 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 theIMPORTstatement.- 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
-
-