Su Ralph created EAGLE-249: ------------------------------ Summary: Support Postgres as hive metadata Key: EAGLE-249 URL: https://issues.apache.org/jira/browse/EAGLE-249 Project: Eagle Issue Type: Bug Affects Versions: v0.3.0 Reporter: Su Ralph Assignee: Su Ralph Fix For: v0.4.0
>From Capital One case //////// It looks very interesting that Postgres has this behavior. Is Postgres your production setting for holding hive metadata? If that is the case, I think we need extend Eagle a little bit to support Postgres. (Hive metadata tables use upper case for both table name and column name) Thanks Edward On Mon, Apr 11, 2016 at 9:02 PM, Carnali, Matthew R. <matthew.carn...@capitalone.com> wrote: Here are the correct queries: 1. select "NAME" from "DBS”; 2. select "t"."TBL_NAME" from "TBLS" t, "DBS" d where "t"."DB_ID"="d"."DB_ID" and "d"."NAME"='%s’; 3. select "c"."COLUMN_NAME" from "DBS" d join "TBLS" t on "d"."DB_ID"="t"."DB_ID" join "SDS" s on "t"."SD_ID"="s"."SD_ID" join "COLUMNS_V2" c on "s"."CD_ID"="c"."CD_ID" where "d"."NAME"='%s' and "t"."TBL_NAME"='%s'; From: "Carnali, Matthew R." <matthew.carn...@capitalone.com> Date: Monday, April 11, 2016 at 8:11 PM To: Edward Zhang <yonzhang2...@gmail.com> Cc: "qingwz...@ebay.com" <qingwz...@ebay.com>, Hao Chen <hao.ch...@ebay.com>, "li...@ebay.com" <li...@ebay.com> Subject: Re: Fail to get WEB_CONFIG configurations for data classification So what I found is the following: http://stackoverflow.com/questions/6331504/omitting-the-double-quote-to-do-query-on-postgresql I modified the queries to have quotes like so (but it still does not seem like it is working correctly, I am investigating further): 1. select ’NAME' from "DBS"; 2. select 't.TBL_NAME' from "TBLS" t, "DBS" d where 't.db_id'='d.db_id' and 'd.name'='%s’; 3. select 'c.column_name' from "DBS" d join "TBLS" t on 'd.db_id'='t.db_id' join "SDS" s on 't.sd_id'='s.sd_id' join "COLUMNS_V2" c on 's.cd_id'='c.cd_id' where 'd.name'='%s' and 't.tbl_name'='%s’; From: Edward Zhang <yonzhang2...@gmail.com> Date: Monday, April 11, 2016 at 3:52 PM To: "Carnali, Matthew R." <matthew.carn...@capitalone.com> Cc: "qingwz...@ebay.com" <qingwz...@ebay.com>, Hao Chen <hao.ch...@ebay.com>, "li...@ebay.com" <li...@ebay.com> Subject: Re: Fail to get WEB_CONFIG configurations for data classification We use the following queries, let me know if any of queries can't be run directly against postgres? 1. to get databases String sql = "select name from DBS"; 2. to get tables String sql_format = "select t.tbl_name from TBLS t, DBS d where t.db_id=d.db_id and d.name='%s'"; 3. to get columns String sql_format = "select c.column_name " + "from DBS d join TBLS t on d.db_id=t.db_id " + "join SDS s on t.sd_id=s.sd_id " + "join COLUMNS_V2 c on s.cd_id=c.cd_id " + "where d.name='%s' and t.tbl_name='%s';"; -- This message was sent by Atlassian JIRA (v6.3.4#6332)