CAUTION Only users with the ADMIN privilege can create a repository.For detailed instructions on deleting a repository, see DROP REPOSITORY.
Syntax
Parameters
PROPERTIES:
The database supports creating repositories in HDFS, AWS S3, and Google GCS.
-
For HDFS:
- “username”: The username of the account that you want to use to access the NameNode of the HDFS cluster.
- “password”: The password of the account that you want to use to access the NameNode of the HDFS cluster.
-
For AWS S3:
-
“aws.s3.use_instance_profile”: Whether or not to allow instance profile and assumed role as credential methods for accessing AWS S3. Default:
false.- If you use IAM user-based credential (Access Key and Secret Key) to access AWS S3, you don’t need to specify this parameter, and you need to specify “aws.s3.access_key”, “aws.s3.secret_key”, and “aws.s3.region”.
- If you use Instance Profile to access AWS S3, you need to set this parameter to
trueand specify “aws.s3.region”. - If you use Assumed Role to access AWS S3, you need to set this parameter to
trueand specify “aws.s3.iam_role_arn” and “aws.s3.region”.
- “aws.s3.access_key”: The Access Key ID that you can use to access the Amazon S3 bucket.
- “aws.s3.secret_key”: The Secret Access Key that you can use to access the Amazon S3 bucket.
- “aws.s3.iam_role_arn”: The ARN of the IAM role that has privileges on the AWS S3 bucket in which your data files are stored. If you want to use assumed role as the credential method for accessing AWS S3, you must specify this parameter. Then, the database will assume this role when it analyzes your Hive data by using a Hive catalog.
-
“aws.s3.region”: The region in which your AWS S3 bucket resides. Example:
us-west-1.
-
“aws.s3.use_instance_profile”: Whether or not to allow instance profile and assumed role as credential methods for accessing AWS S3. Default:
NOTE The database supports creating repositories in AWS S3 only according to the S3A protocol. Therefore, when you create repositories in AWS S3, you must replaces3://in the S3 URI you pass as a repository location inON LOCATIONwiths3a://.
- For Google GCS:
- “fs.s3a.access.key”: The Access Key that you can use to access the Google GCS bucket.
- “fs.s3a.secret.key”: The Secret Key that you can use to access the Google GCS bucket.
- “fs.s3a.endpoint”: The endpoint that you can use to access the Google GCS bucket. Do not specify
httpsin the endpoint address.
NOTE The database supports creating repositories in Google GCS only according to the S3A protocol. Therefore, when you create repositories in Google GCS, you must replace the prefix in the GCS URI you pass as a repository location inON LOCATIONwiths3a://.
- For MinIO:
- “aws.s3.access_key”: The Access Key that you can use to access the MinIO bucket.
- “aws.s3.secret_key”: The Secret Key that you can use to access the MinIO bucket.
- “aws.s3.endpoint”: The endpoint that you can use to access the MinIO bucket.
Examples
Example 1: Create a repository namedhdfs_repo in an Apache™ Hadoop® cluster.
s3_repo in the Amazon S3 bucket bucket_s3.
gcs_repo in the Google GCS bucket bucket_gcs.
minio_repo in the MinIO bucket bucket_minio.
kerberos_repo in an Apache™ Hadoop® cluster with Kerberos enabled.