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

When connecting to db, administrator want to set list of database to hide #744

Closed
kyungtaak opened this issue Nov 12, 2018 · 12 comments
Closed
Assignees
Labels
@datasource Component Name : Datasource/Connection Management enhancement Request Change and Feature Enhancement
Milestone

Comments

@kyungtaak
Copy link
Contributor

kyungtaak commented Nov 12, 2018

Is your feature request related to a problem? Please describe.
Connection 을 활용할 적재 또는 워크벤치 조회시 관리자가 사용자로 하여금 조회를 원치 않는 데이터 베이스를 지정하여 조회하지 못하게 하고 싶은 요구사항이 있습니다.

Describe the solution you'd like

  • DBMS 상에서 권한처리로 가능하지만, 권한처리가 여의치 않을 경우 Tool 측면에서 이를 지원해주도록 합니다.
  • 입력은 DataConnection 내 property 로 입력을 지원합니다. (Add custom properties in DataConnection  #738 이슈 참고)
  • database 입력을 지원하는 워크벤치 및 적재 Preview 단계에서 옵션을 통해 처리하도록 합니다.

Describe alternatives you've considered

  • 모든 DataConnection 에 유효한지 확인하고, 여의치 않은 경우 Hive 만 우선 지원합니다.

Additional context
#738 이슈에 대해 먼저 처리하고 진행해야 합니다.

Properties 설정 안내

Database 목록에서 제외하기 위한 Properties

key : metatron.exclude.databases
value : 데이터베이스명 (콤마로 구분하여 다중입력 가능)

ex) metatron.exclude.databases : default, tmap_dev

Table 목록에서 제외하기 위한 Properties

key : metatron.exclude.tables
value : 테이블명 (콤마로 구분하여 다중입력 가능)

ex) metatron.exclude.tables : log_click, log_app_lake
@kyungtaak kyungtaak added enhancement Request Change and Feature Enhancement @datasource Component Name : Datasource/Connection Management labels Nov 12, 2018
@kyungtaak kyungtaak added this to the 3.1.0 milestone Nov 12, 2018
@AnnieHwang
Copy link
Contributor

@kyungtaak 아래 Publish 설정 기능 말씀하시는거 맞죠?
image

@ufoscw
Copy link
Contributor

ufoscw commented Nov 16, 2018

@AnnieHwang
custom property를 이용해서 처리하려고 합니다.
metatron.excludeDatabase와 같은 설정을 이용해서요..

@kyungtaak
Copy link
Contributor Author

@AnnieHwang @ufoscw 말씀나온김에 용어수정도 같이했으면 하네요.:)

@ufoscw
Copy link
Contributor

ufoscw commented Nov 21, 2018

@brandon-wonjune @sting009
workbench와 datasource에서 connection 정보를 request 파라미터로 사용하는 아래의 API에 properties 파라미터를 추가해주시기 바랍니다.
properties 속성은 DataConneciton 상세조회시 response에 포함되어 있습니다.

1. DataBase 목록 조회 API

(POST) /api/connections/query/databases

Sample Request

{
	"connection":{
		"implementor":"HIVE",
		"authenticationType":"MANUAL",
		"username":"hive",
		"password" : "hive",
		"hostname":"localhost",
		"port":"10000",
		"properties" : { 
			"metatron.exclude.databases" : "table_size, ufoscw",
			"metatron.exclude.tables" : "audit, book"
		}
	}
}

2. Table 목록 조회

(POST) /api/connections/query/tables

Request Sample

{
	"connection":{
		"implementor":"HIVE",
		"authenticationType":"MANUAL",
		"username":"hive",
		"password" : "hive",
		"hostname":"localhost",
		"port":"10000",
		"properties" : { 
			"metatron.exclude.databases" : "table_size, ufoscw",
			"metatron.exclude.tables" : "lineage, book"
		}
	},
	"database" : "default"
}

@ufoscw
Copy link
Contributor

ufoscw commented Nov 22, 2018

@brandon-wonjune @sting009
아래 API도 properties 파라미터 추가 필요합니다.

/api/connection/query/data

@brandon-wonjune
Copy link
Contributor

@ufoscw
connections/query/hive 로 파생되는것도 모두 포함인가요?

@ufoscw
Copy link
Contributor

ufoscw commented Nov 23, 2018

@brandon-wonjune
아니요. 사용자가 직접 입력하는 커넥션을 사용하는 경우만 입니다.

@brandon-wonjune
Copy link
Contributor

@ufoscw
2018-11-23 2 18 39
사용자가 직접 입력하는 커넥션은 위 화면에서 프리셋을 선택하는게 아닌 connection 정보를 직접 입력하는 경우를 말씀하시는건가요?

@ufoscw
Copy link
Contributor

ufoscw commented Nov 23, 2018

@brandon-wonjune
아니요.
connections/query/hive API는 커넥션정보가 서버의 설정으로 관리된다는 의미입니다.

connections/query/hive 로 파생되는 API는 수정대상이 아닙니다.

@ufoscw
Copy link
Contributor

ufoscw commented Nov 23, 2018

그리고 connections/query/hive 로 시작하는 API는 파라미터에 connection 정보가 포함되지 않습니다.

@brandon-wonjune
Copy link
Contributor

@ufoscw 넵 알겠습니다

@brandon-wonjune
Copy link
Contributor

@ufoscw 데이터소스 생성 (db생성)의 위 두 api내에 properties 속성 추가하였습니다.
아래의 경우에 properties가 추가됩니다.

  1. 데이터커넥션에서 프리셋을 선택했을경우
    1-1. 해당 프리셋 상세조회시 properties가 존재하는경우
    1-2. 해당 properties가 key를 가지고있는경우 (properties = {} 제외)

ufoscw added a commit that referenced this issue Nov 23, 2018
@sting009 sting009 mentioned this issue Nov 26, 2018
9 tasks
ufoscw pushed a commit that referenced this issue Nov 26, 2018
* #744 handle properties metatron.excludeDatabase, metatron.excludeTable

* #744 properties projection using only JdbcDataConneciton

* #744 add properties property in datasource create step

* #744 handle properties metatron.excludeDatabase, metatron.excludeTable

* #744 add properties property in datasource create step

* #744 edit typo native prefix

* #744 add property parameter of tables, sample data api
@ufoscw ufoscw closed this as completed Nov 26, 2018
ufoscw pushed a commit that referenced this issue Nov 27, 2018
* #744 handle properties metatron.excludeDatabase, metatron.excludeTable

* #744 properties projection using only JdbcDataConneciton

* #744 add properties property in datasource create step

* #744 handle properties metatron.excludeDatabase, metatron.excludeTable

* #744 add properties property in datasource create step

* #744 edit typo native prefix

* #744 add property parameter of tables, sample data api
alchan-lee pushed a commit that referenced this issue Dec 7, 2018
* #744 handle properties metatron.excludeDatabase, metatron.excludeTable

* #744 properties projection using only JdbcDataConneciton

* #744 add properties property in datasource create step

* #744 handle properties metatron.excludeDatabase, metatron.excludeTable

* #744 add properties property in datasource create step

* #744 edit typo native prefix

* #744 add property parameter of tables, sample data api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@datasource Component Name : Datasource/Connection Management enhancement Request Change and Feature Enhancement
Projects
None yet
Development

No branches or pull requests

6 participants