Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a metadata by database in data connection #1539

Closed
deidera08 opened this issue Feb 27, 2019 · 15 comments
Closed

Creating a metadata by database in data connection #1539

deidera08 opened this issue Feb 27, 2019 · 15 comments
Assignees
Labels
@metadata Component Name : Metadata p1 Priority 1
Milestone

Comments

@deidera08
Copy link

deidera08 commented Feb 27, 2019

Is your feature request related to a problem? Please describe.
현재 메타데이터는 Hive, StagingDB로 생성할 수 있습니다.
향후 사용자 데이터검색(Explore Data)의 방향성에 맞추어 다른 Connection 또한 지원해야 합니다.

Describe the solution you'd like
Create metadata > "Hive" 부분을 "Database"로 바꾸고, DB Connection을 지원합니다.
DB Connection은 Data Storage에서 이미 생성된 Connection만을 허용하며, 직접 Host/port등의 정보를 입력하여 연결하는 것은 허용하지 않습니다.

Describe alternatives you've considered

  1. Database로 메타데이터 생성
    01_createdatabase01

Data Storage > Data Connection에 등록된 Connection만 허용
01_createdatabase02

다중 테이블 등록 지원
01_createdatabase03
01_createdatabase04
.
.
2. StagingDB로 메타데이터 생성
02_createstagingdb01

다중 테이블 등록 지원
02_createstagingdb02
02_createstagingdb03
.
.
3. Data Grid > Database, Staging Type일 경우
datagrid_database

Data Grid > Datasource Type일 경우
datagrid_datasource
.
.
4. 목록
list
.
.
5. 상세화면
information
.
.
.
Additional context
이 이슈는 #1245 에서 3번 기능과 관련있습니다.
초기 기획에는 Datasource 타입일 경우는 Data Grid가 노출되지 않은것으로 계획되었으나, 현재는 구분없이 메타데이터에서 Data Grid를 지원합니다.
더불어 Database타입일 경우 Data Grid를 표현할 수 있는 환경이 먼저 조성되어야 할 것 같아 이 이슈에 해당 내용을 담게 되었습니다.
참고 부탁드립니다.

더불어 ppt를 첨부합니다. 가이드나 추가 논의사항 있으시면 부탁드리겠습니다.
[MDM]Creating a metadata as database.pptx](https://github.com/metatron-app/metatron-discovery/files/2909334/MDM.Creating.a.metadata.as.database.pptx)

@deidera08 deidera08 added the @metadata Component Name : Metadata label Feb 27, 2019
@ninezero90hy ninezero90hy changed the title MDM] Creating a metadata as database [MDM] Creating a metadata as database Feb 27, 2019
@kyungtaak kyungtaak added this to the 3.3.0 milestone Mar 31, 2019
@kyungtaak kyungtaak changed the title [MDM] Creating a metadata as database Creating a metadata by database in data connection Mar 31, 2019
@ufoscw ufoscw added the p1 Priority 1 label May 27, 2019
brandon-wonjune added a commit that referenced this issue Jun 3, 2019
- create connection step
- create connection select box
- create main controller
@koeun222
Copy link

koeun222 commented Jun 3, 2019

@AnnieHwang 디자인화면 공유드립니다

  • Database / StagingDB로 메타데이터 생성
    image

  • Data Storage > Data Connection에 등록된 Connection만 허용
    image

  • 다중 테이블 등록 지원
    image
    image

  • Data Grid
    image

@deidera08
Copy link
Author

@kyungtaak @eltriny @ufoscw @brandon-wonjune
데이터 커넥션 권한에 따른 메타데이터 노출 기본값입니다.
기본적으로 데이터 커넥션 권한과 워스스페이스 전체공개 여부에 디펜던시가 있습니다.
참고 부탁드립니다.
스크린샷 2019-06-03 오후 3 48 18

@brandon-wonjune
Copy link
Contributor

@kyungtaak 메타데이터 생성시에 여러개의 메타데이터를 이름과 설명을 수정하여 보낼수 있도록 되어있는데 어떤 api로 어떻게 보내면 되나요?

@brandon-wonjune brandon-wonjune added the awaiting feedback need to feedback label Jun 3, 2019
@deidera08
Copy link
Author

@kyungtaak @AnnieHwang @brandon-wonjune
맨 마지막 단계에서 미진한 부분이 있어서 보완합니다.
다중 메타데이터 생성시 Invalid 한 상황은 1차적으로 메타데이터명이 적합하지 않을 경우와
서버(엔진)에서 실패해서 생성완료하지 못한 상황일 듯 합니다.
스크린샷 2019-06-03 오후 5 50 29
스크린샷 2019-06-03 오후 5 50 36

살펴보시고 부족한 부분은 가이드 부탁드립니다.

@ufoscw
Copy link
Contributor

ufoscw commented Jun 3, 2019

@kyungtaak 메타데이터 생성시에 여러개의 메타데이터를 이름과 설명을 수정하여 보낼수 있도록 되어있는데 어떤 api로 어떻게 보내면 되나요?

@brandon-wonjune api 추가 후 알려드릴게요.

ufoscw added a commit that referenced this issue Jun 4, 2019
@ufoscw
Copy link
Contributor

ufoscw commented Jun 4, 2019

@brandon-wonjune
2개의 API가 추가되었습니다.

  1. create batch metadata
(post) /api/metadatas/batch
  • request sample
[
   {
      "name":"sales",
      "description":"aaa",
      "sourceType":"JDBC",
      "source":{
         "name":"Hive-localhost-10000",
         "type":"JDBC",
         "sourceId":"c5617950-2e4a-4c34-8d95-62c3daea2fe5",
         "schema":"default",
         "table":"sales"
      }
   },
   {
      "name":"lineage",
      "description":"bbb",
      "sourceType":"JDBC",
      "source":{
         "name":"Hive-localhost-10000",
         "type":"JDBC",
         "sourceId":"c5617950-2e4a-4c34-8d95-62c3daea2fe5",
         "schema":"default",
         "table":"lineage"
      }
   }
]
  1. duplicate check batch
(post) /api/metadatas/name/duplicated
  • request sample (metadata name list)
["sales", "lineage"]
  • response sample (duplicated metadata name list. Empty array if there are no duplicates)
["sales", "lineage"]

@brandon-wonjune
Copy link
Contributor

@ufoscw
이미 메타데이터로 생성된 테이블을 제외한 테이블 목록을 조회하는 api는 어느것을 사용해야되나요?
스크린샷 2019-06-04 오전 10 45 01

@ufoscw
Copy link
Contributor

ufoscw commented Jun 4, 2019

@brandon-wonjune
기존 사용하는 API 그대로 사용하시면 됩니다.

(post) /api/connections/metadata/tables/jdbc
  • request sample
{
   "connection":{
      "id":"c5617950-2e4a-4c34-8d95-62c3daea2fe5",
      "implementor":"HIVE",
      "authenticationType":"MANUAL",
      "username":"hive",
      "password":"hive",
      "hostname":"localhost",
      "port":"10000"
   },
   "type":"TABLE",
   "database":"default"
}

@ufoscw ufoscw removed the awaiting feedback need to feedback label Jun 4, 2019
ufoscw added a commit that referenced this issue Jun 4, 2019
@brandon-wonjune
Copy link
Contributor

  1. create batch metadata
(post) /api/metadatas/batch
  • request sample
[
   {
      "name":"sales",
      "description":"aaa",
      "sourceType":"JDBC",
      "source":{
         "name":"Hive-localhost-10000",
         "type":"JDBC",
         "sourceId":"c5617950-2e4a-4c34-8d95-62c3daea2fe5",
         "schema":"default",
         "table":"sales"
      }
   },
   {
      "name":"lineage",
      "description":"bbb",
      "sourceType":"JDBC",
      "source":{
         "name":"Hive-localhost-10000",
         "type":"JDBC",
         "sourceId":"c5617950-2e4a-4c34-8d95-62c3daea2fe5",
         "schema":"default",
         "table":"lineage"
      }
   }
]

@ufoscw api에 대해 문의 드립니다.
해당 api를 생성할 때 사용하려고 하는데요.

  1. sourceType의 경우 '메타데이터 데이터베이스 생성'만 해당하는건가요? 'stagingDB' 의 경우는 어떤 값으로 해야되나요?

  2. source 의 경우 선택한 커넥션의 정보같은데요 staging의 경우는 어떤 값으로 날려야되나요?

@brandon-wonjune brandon-wonjune added the awaiting feedback need to feedback label Jun 4, 2019
brandon-wonjune added a commit that referenced this issue Jun 5, 2019
- init select component
- init complete component
@ufoscw
Copy link
Contributor

ufoscw commented Jun 5, 2019

@brandon-wonjune
stage는 위 api 사용하시면 됩니다.

request sample

[
	{
	   "name":"sales_stage",
	   "description":"aaa",
	   "sourceType":"STAGEDB",
	   "source":{
	      "name":"Stage DB",
	      "type":"STAGEDB",
	      "sourceId":"STAGE",
	      "schema":"default",
	      "table":"sales"
	   }
	},
	{
	   "name":"lineage_stage",
	   "description":"bbb",
	   "sourceType":"STAGEDB",
	   "source":{
	      "name":"Stage DB",
	      "type":"STAGEDB",
	      "sourceId":"STAGE",
	      "schema":"default",
	      "table":"lineage"
	   }
	}
]

@brandon-wonjune
Copy link
Contributor

brandon-wonjune commented Jun 5, 2019

@ufoscw 테이블 목록 조회시 문의 드립니다.
현재 데이터베이스 목록의 경우

api/connections/metadata/tables/jdbc

스테이징의 경우

api/connections/metadata/tables/stage

를 사용중인데요.
스크린샷 2019-06-05 오후 2 08 32
화면에서 테이블 을 선택하고 다음 생성완료 단계로 넘어가야는데
간혹 테이블을 상세조회시 아래와 같은 에러가 나타나는 상황이 있습니다.

// api
api/connections/query/data?extractColumnName=false

// request params
{
  "connection": {
    "implementor": "MYSQL",
    "hostname": "metatron-web-01",
    "port": "3306",
    "authenticationType": "MANUAL",
    "username": "polaris",
    "password": "polaris$00"
  },
  "type": "TABLE",
  "database": "information_schema",
  "query": "INNODB_BUFFER_POOL_STATS"
}

// error
code: "error.dataconnection.jdbc.preview.table"
details: "JdbcDataConnectionException: Fail to query : 42000, 1227, Access denied; you need (at least one of) the PROCESS privilege(s) for this operation"
message: "Ooops!"

이 경우 기존 화면에서는 미리보기 화면에 오류를 표기하고 다음 생성단계로 넘어가지 못하도록 되어있는데요.
현재 변경될 화면에서는 전체선택이 있기때문에 테이블을 선택하지 않는한 오류확인을 할 수 없습니다.
테이블 목록을 조회하는 api에 추가 인자로 테이블마다 error여부가 있거나 별도의 api가 필요할 것 같습니다.

@ufoscw
Copy link
Contributor

ufoscw commented Jun 5, 2019

@brandon-wonjune
메타데이터 등록은 완료된 상태고, 생성된 메타데이터 상세보기시 data 조회 api에서 에러가 난다는거죠?
메타데이터 > 상세보기 > column schema tab 에서 data조회 api는 어떤 용도로 사용중인가요?

@brandon-wonjune brandon-wonjune removed the awaiting feedback need to feedback label Jun 5, 2019
brandon-wonjune added a commit that referenced this issue Jun 7, 2019
brandon-wonjune added a commit that referenced this issue Jun 7, 2019
brandon-wonjune added a commit that referenced this issue Jun 7, 2019
ufoscw added a commit that referenced this issue Jun 7, 2019
ufoscw added a commit that referenced this issue Jun 7, 2019
ufoscw added a commit that referenced this issue Jun 7, 2019
* #2177 add oracle extension

* #1539 fix typos

* #2177 change profile name (include-all -> extensions-all)
brandon-wonjune pushed a commit that referenced this issue Jun 7, 2019
- remove not used method in storage service
ufoscw pushed a commit that referenced this issue Jun 10, 2019
* #1539 init metadata create component

- create connection step
- create connection select box
- create main controller

* #1539 add metadata constant and message bundle

* #1539 add batch api

* #1539 add link set up connection in metadata connection step

- init select component
- init complete component

* #1539 add database metadata create

* #1539 add database metadata create

* #1539 fix data grid preview in create step

* #1539 change get query params logic

* #1539 if changed connection info, add remove prev data

* #1539 fix metadata create params used database

* #1539 fix metadata list type tag

* #1539 fix metadata detail type

* #1539 add preset id property in connection info

* #1539 rollback css

* #1539 change property in table list params

* #1539 fix width in metadata list, metadata name

* #1539 add logical type property

* #1539 add datetime type

* #1539 convert implementor type in metadata detail information tab

- remove not used method in storage service
@ufoscw
Copy link
Contributor

ufoscw commented Jun 10, 2019

해당 이슈에서는 Metadata 생성 기능을 처리하고, 생성된 Metadata 상세 보기 기능은 #2172 에서 처리할 예정입니다.

@ufoscw ufoscw closed this as completed Jun 10, 2019
brandon-wonjune added a commit that referenced this issue Jun 10, 2019
kyungtaak pushed a commit that referenced this issue Jun 12, 2019
* #1539 add select schema message

* #1539 add disabled class in create metadata none selected table

* #1539 fix width metadata list col

* #1539 fix table list class in complete step

* #1539 add auto show schema list in metadata create step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@metadata Component Name : Metadata p1 Priority 1
Projects
None yet
Development

No branches or pull requests

6 participants