Package com.exasol
Interface ExaImportSpecification
-
public interface ExaImportSpecification
This class holds all information about a user-definedIMPORT
, which can be started using theIMPORT FROM SCRIPT ...
statement.To support a user defined
IMPORT
you 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 ExaConnectionInformation
getConnectionInformation()
Get the connection details from the connection if one is specified for the import.String
getConnectionName()
Get the name of the connection to be used for the import.Map<String,String>
getParameters()
Get the parameters specified in theIMPORT
statement.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.boolean
hasConnectionInformation()
Check whether the details of a connection are specified that the import should use.boolean
hasConnectionName()
Check whether the name of a connection is specified that the import should use.boolean
isSubselect()
Check whether theIMPORT
is part of a sub-select statement.
-
-
-
Method Detail
-
isSubselect
boolean isSubselect()
Check whether theIMPORT
is part of a sub-select statement.- Returns:
true
, if the import is used inside aSELECT
statement (i.e. not inside anIMPORT 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 theIMPORT
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
-
-