All Products
Search
Document Center

DataWorks:Hive

Last Updated:Nov 07, 2024

Property definition

  • Data source type: hive

  • Supported configuration modes (ConnectionPropertiesMode):

    • Connection string mode (UrlMode)

    • Instance mode (InstanceMode)

    • CdhMode (CDH cluster mode)

Instance mode of the current Alibaba Cloud account

Parameter

Type

Example

Required

Description and note

regionId

String

cn-shanghai

Yes

The region ID.

clusterId

String

c-d1a993bbcd298315

Yes

The instance ID.

database

String

db1

Yes

The name of the database.

version

String

2.3.9

Yes

The version of Hive.

authType

String

Executor

Yes

The identity used to access Object Storage Service (OSS). Valid values:

  • Executor: The executor in the development environment.

  • PrimaryAccount: The Alibaba Cloud account used in the production environment.

  • SubAccount: A specified RAM user used in the production environment.

  • RamRole: A specified RAM role in the production environment.

authIdentity

String

123123

No

The ID of the RAM user or RAM role.

This parameter is required if you set the authType parameter to SubAccount or RamRole.

loginMode

String

LDAP

Yes

The Hive logon mode. Valid values:

  • Anonymous

  • LDAP

username

String

xxx

No

The username. This parameter is required if you want to use a username and a password to log on to Hive.

password

String

xxx

No

The password. This parameter is required if you want to use a username and a password to log on to Hive.

securityProtocol

String

authTypeNone

No

The authentication type. Valid values:

  • authTypeNone: No authentication type is specified.

  • authTypeSsl: SSL authentication is enabled.

  • authTypeKerberos: Kerberos authentication is enabled.

truststoreFile

String

1

No

The ID of the truststore file.

truststorePassword

String

apasara

No

The password of the truststore file.

keystoreFile

String

2

No

The ID of the Keystore file.

keystorePassword

String

apasara

No

The password of the Keystore file.

kerberosFileConf

String

123123

No

The IDs of the configuration files for Kerberos authentication.

kerberosFileKeytab

String

123123

No

The ID of the keytab file for Kerberos authentication.

principal

String

xxx@com

No

The principal.

hiveConfig

JSON Object

{
    "fs.oss.accessKeyId": "xxx"
}

No

The extended parameter.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Instance mode of another Alibaba Cloud account

Parameter

Type

Example

Required

Description and note

crossAccountOwnerId

String

11111

Yes

The UID of another Alibaba Cloud account.

crossAccountRoleName

String

xx-role

Yes

The name of the RAM role assumed by another Alibaba Cloud account.

regionId

String

cn-shanghai

Yes

The region ID.

clusterId

String

c-d1a993bbcd298315

Yes

The instance ID.

database

String

db1

Yes

The name of the database.

version

String

2.3.9

Yes

The version of Hive.

authType

String

RamRole

Yes

The identity used to access OSS. Set the value to RamRole.

loginMode

String

LDAP

Yes

The Hive logon mode. Valid values:

  • Anonymous

  • LDAP

username

String

xxx

No

The username. This parameter is required if you want to use a username and a password to log on to Hive.

password

String

xxx

No

The password. This parameter is required if you want to use a username and a password to log on to Hive.

securityProtocol

String

authTypeNone

No

The authentication type. Valid values:

  • authTypeNone: No authentication type is specified.

  • authTypeSsl: SSL authentication is enabled.

  • authTypeKerberos: Kerberos authentication is enabled.

truststoreFile

String

1

No

The ID of the truststore file.

truststorePassword

String

apasara

No

The password of the truststore file.

keystoreFile

String

2

No

The ID of the Keystore file.

keystorePassword

String

apasara

No

The password of the Keystore file.

kerberosFileConf

String

123123

No

The IDs of the configuration files for Kerberos authentication.

kerberosFileKeytab

String

123123

No

The ID of the keytab file for Kerberos authentication.

principal

String

xxx@com

No

The principal.

hiveConfig

JSON Object

{
    "fs.oss.accessKeyId": "xxx"
}

No

The extended parameter.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Connection string mode

Parameter

Type

Example

Required

Description and note

address

JSON Array

[
  {
    "host":"127.0.0.1",
    "port":"1234"
  }
]

Yes

The address, which contains only a single pair of host and port.

database

String

hive_database

Yes

The name of the database.

metaType

String

HiveMetastore

Yes

The metadata storage type. Valid values:

  • HiveMetastore

  • DLF1.0

metastoreUris

String

thrift://123:123

Yes

The URI used to access the Hive Metastore.

version

String

2.3.9

Yes

The version of Hive.

accessId

String

xxxxx

No

The AccessKey ID. This parameter is required if you set the metaType parameter to DLF.

accessKey

String

xxxxx

No

The AccessKey secret. This parameter is required if you set the metaType parameter to DLF.

properties

JSON Object

{
    "useSSL": "false"
}

No

The properties of the driver.

defaultFS

String

xxx

No

The default FS.

loginMode

String

LDAP

Yes

The Hive logon mode. Valid values:

  • Anonymous

  • LDAP

username

String

xxx

No

The username. This parameter is required if you want to use a username and a password to log on to Hive.

password

String

xxx

No

The password. This parameter is required if you want to use a username and a password to log on to Hive.

securityProtocol

String

authTypeNone

No

The authentication type. Valid values:

  • authTypeNone: No authentication type is specified.

  • authTypeSsl: SSL authentication is enabled.

  • authTypeKerberos: Kerberos authentication is enabled.

truststoreFile

String

1

No

The ID of the truststore file.

truststorePassword

String

apasara

No

The password of the truststore file.

keystoreFile

String

2

No

The ID of the Keystore file.

keystorePassword

String

apasara

No

The password of the Keystore file.

kerberosFileConf

String

123123

No

The IDs of the configuration files for Kerberos authentication.

kerberosFileKeytab

String

123123

No

The ID of the keytab file for Kerberos authentication.

principal

String

xxx@com

No

The principal.

hiveConfig

JSON Object

{
    "fs.oss.accessKeyId": "xxx"
}

No

The extended parameter.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

CDH mode

Parameter

Type

Example

Required

Description and note

clusterIdentifier

String

cdh_cluster

Yes

The CDH cluster.

database

String

db1

Yes

The name of the database.

defaultFS

String

xxx

No

The default FS.

loginMode

String

LDAP

Yes

The Hive logon mode. Valid values:

  • Anonymous

  • LDAP

username

String

xxx

No

The username. This parameter is required if you want to use a username and a password to log on to Hive.

password

String

xxx

No

The password. This parameter is required if you want to use a username and a password to log on to Hive.

securityProtocol

String

authTypeNone

No

The authentication type. Valid values:

  • authTypeNone: No authentication type is specified.

  • authTypeSsl: SSL authentication is enabled.

truststoreFile

String

1

No

The ID of the truststore file.

truststorePassword

String

apasara

No

The password of the truststore file.

keystoreFile

String

2

No

The ID of the Keystore file.

keystorePassword

String

apasara

No

The password of the Keystore file.

kerberosFileConf

String

123123

No

The IDs of the configuration files for Kerberos authentication.

kerberosFileKeytab

String

123123

No

The ID of the keytab file for Kerberos authentication.

principal

String

xxx@com

No

The principal.

hiveConfig

JSON Object

{
    "fs.oss.accessKeyId": "xxx"
}

No

The extended parameter.

envType

String

Dev

Yes

The information about the data source environment. Valid values:

  • Dev: The development environment.

  • Prod: The production environment.

Configuration example of a data source

Instance mode of the current Alibaba Cloud account

{
    "clusterId": "c-xxxxxxxxx",
    "regionId": "cn-shanghai",
    "database": "db",
    "loginMode":"disable",
    "version": "2.3.9",
    "authType": "Executor",
    "securityProtocol": "authTypeNone",
    "envType": "Dev"
}

Instance mode of another Alibaba Cloud account

{
    "clusterId": "c-xxxxxxxxx",
    "regionId": "cn-shanghai",
    "database": "db",
    "loginMode":"LDAP",
    "version": "2.3.9",
    "authType": "Executor",
    "securityProtocol": "authTypeNone",
    "envType": "Dev"
}

Connection string mode

{
    "address": [
        {
            "host": "127.0.0.1",
            "port": 5432
        }
    ],
    "database": "db",
    "properties": {
        "connectTimeout": "2000"
    },
    "username": "aliyun",
    "password": "xxx",
    "metastoreUris":"thrift://123:123",
    "metaType":"HiveMetastore",
    "loginMode":"LDAP",
    "securityProtocol": "authTypeNone",
    "envType": "Dev"
}

CDH mode

{
    "clusterIdentifier": "c-xxxxxxxxx",
    "database": "db",
    "ldapEnable":"LDAP",
    "authType": "Executor",
    "securityProtocol": "authTypeNone",
    "envType": "Dev"
}