mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-23 08:38:02 +00:00
Fix the bug where MySQL credential isn't properly passed to DatabaseWriter. (#585)
This commit is contained in:
parent
8058734917
commit
a950cdbc1a
@ -44,9 +44,9 @@ public class DatabaseWriter extends Writer {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public DatabaseWriter(String connectionUrl, String tableName)
|
||||
public DatabaseWriter(String connectionUrl, String username, String password, String tableName)
|
||||
throws SQLException {
|
||||
DriverManagerDataSource dataSource = new DriverManagerDataSource(connectionUrl);
|
||||
DriverManagerDataSource dataSource = new DriverManagerDataSource(connectionUrl, username, password);
|
||||
this.jdbcTemplate = new JdbcTemplate(dataSource);
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class AzLineageExtractorMaster {
|
||||
String wherehowsUserName = prop.getProperty(Constant.WH_DB_USERNAME_KEY);
|
||||
String wherehowsPassWord = prop.getProperty(Constant.WH_DB_PASSWORD_KEY);
|
||||
Connection conn = DriverManager.getConnection(wherehowsUrl, wherehowsUserName, wherehowsPassWord);
|
||||
DatabaseWriter databaseWriter = new DatabaseWriter(conn.getMetaData().getURL(), "stg_job_execution_data_lineage");
|
||||
DatabaseWriter databaseWriter = new DatabaseWriter(wherehowsUrl, wherehowsUserName, wherehowsPassWord, "stg_job_execution_data_lineage");
|
||||
|
||||
AzLogParser.initialize(conn);
|
||||
PathAnalyzer.initialize(conn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user