湖仓构建 LAKEFORMATION-创建任务:请求示例
时间:2025-04-21 15:56:23
请求示例
POST https://{endpoint}/v1/{project_id}/instances/{instance_id}/lf-jobs { "name" : "testjob", "description" : "testjob", "type" : "METADATA_MIGRATION", "parameter" : { "metadata_migration_parameter" : { "datasource_type" : "ALIYUN_DLF", "datasource_parameter" : { "jdbc_url" : "jdbc:protocol://host:port/db_name", "username" : "root", "password" : "password", "endpoint" : "example.com", "access_key" : "LTAIxxxxxxxxxxxxxxxxRxPG", "secret_key" : "12345xxxxxxxxxxxxxxxxNabcdefgh", "subnet_ip" : "127.0.0.1" }, "source_catalog" : "sourceCatalog1", "target_catalog" : "targetCatalog1", "conflict_strategy" : "UPSERT", "log_location" : "obs://logStore/2023", "sync_objects" : [ "string" ], "default_owner" : "string", "locations" : [ { "key" : "test/test1", "value" : "test2/db" } ], "instance_id" : "string", "ignore_obs_checked" : false, "network_type" : "EIP", "accepted_vpc_id" : "13551d6b-755d-4757-b956-536f674975c0" }, "permission_migration_parameter" : { "location" : "obs://location/uri/", "file_name" : "string", "log_location" : "obs://logStore/2023", "policy_type" : "DLF", "catalog_id" : "test_catalog", "instance_id" : "string", "ranger_permission_migration_principal_relas" : { "user_to" : " IAM _USER", "user_prefix" : "string", "user_suffix" : "string", "group_to" : "IAM_USER", "group_prefix" : "string", "group_suffix" : "string", "role_to" : "IAM_USER", "role_prefix" : "string", "role_suffix" : "string" } }, "metadata_discovery_parameter" : { "data_location" : "obs://logStore/2023", "target_catalog" : "targetCatalog1", "target_database" : "targetCatalog1", "conflict_strategy" : "UPDATE", "file_discovery_type" : "PARQUET", "separator" : ",", "quote" : "DOUBLE_QUOTE", "escape" : "\\", "header" : false, "file_sample_rate" : 100, "table_depth" : 3, "log_location" : "obs://logStore/2023", "default_owner" : "testOwner", "principals" : [ { "principal_type" : "USER", "principal_source" : "IAM", "principal_name" : "user1" } ], "give_write" : false, "instance_id" : "abcdefgh12345678abcdefgh12345678", "rediscovery_policy" : "FULL_DISCOVERY", "execute_strategy" : "MANNUAL", "execute_frequency" : "MONTHLY", "execute_day" : 1, "execute_hour" : 1, "execute_minute" : 1 } } }
support.huaweicloud.com/api-lakeformation/CreateJobByInstance.html