Apache Atlas2.0 第五节 集成RDBMS

查找了许多资料,发现对RDBMS支持很少,貌似需要写Rdbms的bridge,这里只介绍通过API方式,将mysql 导入到Atlas,血缘关系,继续改进

请求方式:Post

请求路径:http://localhost:21000/api/atlas/v2/entity

请求验证方式:BaseAuth   admin/admin

建立数据库实例:
//3cd3adc7-67cf-4563-9795-ab8cad26271a

{
    "entity": {
	    "typeName":   "rdbms_instance",
		"attributes": {
			"qualifiedName": "10.10.66.29@mysql@instance",
			"name":          "10.10.66.29@mysql",
			"rdbms_type":"MYSQL",
			"platform":"win7",
			"cloudOrOnPrem":"cloud",
			"hostname":"10.10.66.29",
			"port":"3306",
			"protocol":"http",
			"contact_info":"jdbc",
			"comment":"rdbms_instance API insert test",
			"description":"rdbms_instance描述",
			"owner":"caozqa"
		}
    }
}

 

创建数据源,并关联数据实例
{
    "entity": {
	    "typeName":   "rdbms_db",
		"attributes": {
			"qualifiedName": "10.10.66.29@mysql@datag",
			"owner":	"caozqa",
			"ownerType":"USER",
		    "name":          "datag",
			"emailAddress":  "caozqa",
			"createdBy":     "caozqaAPI",
			"createTime":    "2017-08-25T13:15:25.369Z",
			"updatedBy":     "caozqa",
			"updateTime":    "2017-08-25T14:12:45.246Z",
			"description":   "rdbms_db datag API input",
			"prodOrOther":"44",
			"version":0,
			"contact_info":"111",
			"instance":{
                "guid": "3cd3adc7-67cf-4563-9795-ab8cad26271a",
                "typeName": "rdbms_instance"
            }
		}
    }
}
创建数据字段
//37e111ad-9336-475e-a39a-d53a771ab1bb

{
    "entity": {
	    "typeName":   "rdbms_column",
		"attributes": {
			"qualifiedName": "id@table_01@datag@10.10.66.29",
			"createdBy":     "caozqaAPI",
			"createTime":    "2017-08-25T13:15:25.369Z",
			"updatedBy":     "caozqaAPI",
			"updateTime":    "2017-08-25T14:12:45.246Z",
			"name":          "id",
			"comment":"rdbms_column API insert test",
			"description":"rdbms_column  手动输入",
			"owner":"caozqa",
			"data_type":"String",
			"length":20,
			"default_value":0,
			"isNullable":false,
			"isPrimaryKey":true,
			"contact_info":"id_info"
		}
    }
}
创建数据表,关联数据源和数据字段

//f438d921-ff4c-4838-bdca-3b868bbed825

{
    "entity": {
	    "typeName":   "rdbms_table",
		"attributes": {
			"qualifiedName": "table_01@datag@10.10.66.29",
			"createdBy":     "caozqaAPI",
			"createTime":    "2017-08-25T13:15:25.369Z",
			"updatedBy":     "caozqaAPI",
			"updateTime":    "2017-08-25T14:12:45.246Z",
			"name":          "table_01",
			"comment":"rdbms_table API insert test",
			"description":"rdbms_table  手动输入",
			"owner":"caozqa",
			"type":"table",
			"contact_info":"table_01_info",
			"db": {
                "guid": "26fca771-8115-4955-a0d9-54103466c35e",
                "typeName": "rdbms_db"
            },
			"columns": [{
                "guid": "37e111ad-9336-475e-a39a-d53a771ab1bb",
                "typeName": "rdbms_table"
            }]
		}
    }
}

 

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值