Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Constructing a Data Lake

Updated on 2024-11-21 GMT+08:00

MRS can only connect to the hive catalog and the default database in LakeFormation.

After a LakeFormation instance is created, you can create catalogs and metadata such as databases and tables as required.

For example, perform the following steps to create a catalog named hive (fixed name, which cannot be customized) and create a database named default (fixed name, which cannot be customized) in the catalog. Assign permissions for the two data tables table_A and table_B contained in the database.

Creating an OBS Path for Storing Metadata

  1. Log in to the LakeFormation console.
  2. Click in the upper left corner of the page and choose Storage > Object Storage Service to access the Object Storage Service console.
  3. Click Parallel File Systems and click Create Parallel File System. On the displayed page, set the parameters, and click Create Now.

    • File System Name: Set the name of the parallel file system as required, for example, lakeformation-test.
    • Set other parameters based on the site requirements.

  4. On the Parallel File Systems page, click the name of the created file system, that is lakeformation-test.
  5. Click Files in the navigation pane, click Create Folder, enter a folder name, and click OK. Click the folder name and click Create Folder to create a subfolder.

    Repeat this step to create paths for storing metadata in sequence. The following paths are examples:

    • Catalog storage path: lakeformation-test/catalog1
    • Database storage path: lakeformation-test/catalog1/database1
    • Table storage path: lakeformation-test/catalog1/database1/table1 and lakeformation-test/catalog1/database1/table2
    • Function storage path: lakeformation-test/catalog1/database1/udf1

Creating a Catalog

  1. Log in to the LakeFormation console.
  2. In the upper left corner, click and choose Analytics > LakeFormation to access the LakeFormation console.
  3. Select the created LakeFormation instance (for example, lakeformation-test). For how to create an instance, see the operations described in Creating a LakeFormation Instance and a Client Connection. Choose Metadata > Catalog in the navigation pane.

    You only need one hive catalog per instance. If you already have one in the current instance, you can skip creating another one.

  4. Click Create in the upper right corner. On the displayed page, set the following parameters, and click Submit.

    • Catalog Name: hive

      The name is fixed and cannot be customized.

    • Select Location: Click , select a storage location, for example, obs://lakeformation-test/catalog1, and click OK.
    • Catalog Type: DEFAULT
    • Retain the default values for other parameters.

  5. After the catalog is created, you can view the catalog information on the Catalog page.

Creating a Database

  1. Log in to the LakeFormation console.
  2. In the upper left corner, click and choose Analytics > LakeFormation to access the LakeFormation console.
  3. Select the created LakeFormation instance (for example, lakeformation-test). For how to create an instance, see the operations described in Creating a LakeFormation Instance and a Client Connection. Choose Metadata > Database in the navigation pane.
  4. Select hive from the Catalog drop-down list box in the upper right corner.

    You only need one default database per instance. If you already have one in the current instance, you can skip creating another one.

  5. Click Create, set related parameters, and click Submit.

    • Database Name: default

      The name is fixed and cannot be customized.

    • Catalog: hive
    • Select Location: Click , select a storage location, for example, obs://lakeformation-test/catalog1/database1, and click OK.
    • Retain the default values for other parameters.

  6. After the catalog is created, you can view the database information on the Database page.

Creating a Table

  1. Log in to the LakeFormation console.
  2. In the upper left corner, click and choose Analytics > LakeFormation to access the LakeFormation console.
  3. Select the created LakeFormation instance (for example, lakeformation-test) from the drop-down list box on the left. For how to create an instance, see Creating a LakeFormation Instance and a Client Connection. Choose Metadata > Table in the navigation pane and select hive and default from the Catalog and Database drop-down lists in the upper right corner.
  4. Click Create, set related parameters, and click Submit.

    • Table Name: Enter a table name, for example, table_A.
    • Data Storage Location: Click , select a location for storing the table in the OBS parallel file system, for example, obs://lakeformation-test/catalog1/database1/table1, and click OK.
    • Set other parameters based on the site requirements.

  5. Create another table named table_B and set the storage path to lakeformation-test/catalog1/database1/table2 by referring to 4.
  6. After these two tables are created, you can check these tables on the Table page.

Authorizing Metadata

  1. Log in to the LakeFormation console.
  2. In the upper left corner, click and choose Analytics > LakeFormation to access the LakeFormation console.
  3. Select the target LakeFormation instance from the drop-down list box on the left and choose Data Permissions > Data Authorization.
  4. Click Authorize, authorize the hive catalog and the default database as required, and click OK.

    For details about authorization configurations and requirements, see Granting permissions.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback