Skip to content

Commit

Permalink
Code changes for SDENT-167:
Browse files Browse the repository at this point in the history
 - Updating metadata.properties and metadata_lc.properties files
   to hide internal schemas from external JDBC Tools.
  • Loading branch information
snappy-sachin committed Mar 25, 2020
1 parent 5d5401f commit 167fe19
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,22 @@ getProcedures40=\
#
getSchemas=\
SELECT SCHEMANAME AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.SYSSCHEMAS \
WHERE ((1=1) OR ? IS NOT NULL) \
AND SCHEMANAME LIKE ? \
\
UNION \
\
SELECT DISTINCT SCHEMANAME AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.HIVETABLES \
WHERE SCHEMANAME LIKE ? \
ORDER BY TABLE_SCHEM
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.SYSSCHEMAS \
WHERE ((1=1) OR ? IS NOT NULL) \
AND SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
\
UNION \
\
SELECT DISTINCT SCHEMANAME AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.HIVETABLES \
WHERE SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
ORDER BY TABLE_SCHEM

# REMIND: presently table_type is a single char, we match JDBC
# recommendations closer and make it a more obvious word.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,17 @@ getSchemas=\
FROM SYS.SYSSCHEMAS \
WHERE ((1=1) OR ? IS NOT NULL) \
AND SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
\
UNION \
\
SELECT DISTINCT LOWER (SCHEMANAME) AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.HIVETABLES \
WHERE SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
ORDER BY TABLE_SCHEM

# REMIND: presently table_type is a single char, we match JDBC
Expand Down

0 comments on commit 167fe19

Please sign in to comment.