Skip to content

Enhancing SchemaCrawler Output with Custom Table #1337

Closed Answered by sualeh
escalate asked this question in Q&A
Discussion options

You must be logged in to vote

@escalate I was able to reproduce and get it to work. The MySQL/ MariaDB JDBC driver does not report the table catalog and schema the same way as INFORMATION_SCHEMA.COLUMNS, so you will need to modify your join like this:

select.ADDITIONAL_INFO.ADDITIONAL_COLUMN_ATTRIBUTES=\
SELECT  \
  i.TABLE_SCHEMA AS TABLE_CATALOG, \
  NULL AS TABLE_SCHEMA, \
  i.TABLE_NAME,  \
  i.COLUMN_NAME,  \
  g.is_sensitive \
FROM  \
  INFORMATION_SCHEMA.COLUMNS i  \
JOIN testing.gdpr_column_information g  \
ON i.TABLE_SCHEMA = g.table_schema  \
AND i.TABLE_NAME = g.table_name  \
AND i.COLUMN_NAME = g.column_name

and your SchemaCrawler command will look something like this:

schemacrawler \
--log-level=OFF \
--…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by escalate
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants