Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ private Config processConfigParameters(String configContent) throws IOException
StringSubstitutor stringSubstitutor = new StringSubstitutor(configParameters, "${", "}");
String processedUrl = stringSubstitutor.replace(connection.getUrl());
connection.setUrl(processedUrl);

// Process DuckLake-specific fields for environment variable substitution
if (connection.getDuckdbDatabasePath() != null) {
String processedDuckdbPath = stringSubstitutor.replace(connection.getDuckdbDatabasePath());
connection.setDuckdbDatabasePath(processedDuckdbPath);
}
if (connection.getDucklakeDataPath() != null) {
String processedDataPath = stringSubstitutor.replace(connection.getDucklakeDataPath());
connection.setDucklakeDataPath(processedDataPath);
}
if (connection.getDucklakeMetadataDb() != null) {
String processedMetadataDb = stringSubstitutor.replace(connection.getDucklakeMetadataDb());
connection.setDucklakeMetadataDb(processedMetadataDb);
}
}

return config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public class Connection {
private String userName;
private String password;
private Collection<String> tables = new ArrayList<>();

// DuckLake-specific fields
private String duckdbDatabasePath;
private String ducklakeDataPath;
private String ducklakeMetadataDb;

public Connection() {
}
Expand Down Expand Up @@ -84,6 +89,30 @@ public void setTables(Collection<String> tables) {
this.tables = tables;
}

public String getDuckdbDatabasePath() {
return duckdbDatabasePath;
}

public void setDuckdbDatabasePath(String duckdbDatabasePath) {
this.duckdbDatabasePath = duckdbDatabasePath;
}

public String getDucklakeDataPath() {
return ducklakeDataPath;
}

public void setDucklakeDataPath(String ducklakeDataPath) {
this.ducklakeDataPath = ducklakeDataPath;
}

public String getDucklakeMetadataDb() {
return ducklakeMetadataDb;
}

public void setDucklakeMetadataDb(String ducklakeMetadataDb) {
this.ducklakeMetadataDb = ducklakeMetadataDb;
}

public Map<String, String> toMap() {
ObjectMapper objectMapper = new ObjectMapper();
return objectMapper.convertValue(this, Map.class);
Expand Down
Loading
Loading