Hana
HANA reader.
koheesio.spark.readers.hana.HanaReader #
Wrapper around JdbcReader for SAP HANA
Notes
- Refer to JdbcReader for the list of all available parameters.
- Refer to SAP HANA Client Interface Programming Reference docs for the list of all available connection string parameters: https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/109397c2206a4ab2a5386d494f4cf75e.html
Example
Note: jars should be added to the Spark session manually. This class does not take care of that.
This example depends on the SAP HANA ngdbc
JAR. e.g. ngdbc-2.5.49.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
JDBC connection string. Refer to SAP HANA docs for the list of all available connection string parameters.
Example: jdbc:sap:// |
required |
user
|
str
|
|
required |
password
|
SecretStr
|
|
required |
dbtable
|
str
|
Database table name, also include schema name |
required |
params
|
Optional[Dict[str, Any]]
|
Extra options/params to pass to the SAP HANA JDBC driver. Refer to SAP HANA docs for the list of all available connection string parameters. Also can be passed as arbitrary keyword arguments to the HanaReader class. Default values: {"fetchsize": 2000, "numPartitions": 10} |
{"fetchsize": 2000, "numPartitions": 10}
|
query
|
Optional[str]
|
Query |
required |
format
|
str
|
The type of format to load. Defaults to 'jdbc'. Should not be changed. |
required |
driver
|
str
|
Driver name. Be aware that the driver jar needs to be passed to the task. Should not be changed. |
required |