-
Notifications
You must be signed in to change notification settings - Fork 7
Support External Postgres DB #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d9498ef
9677012
49bbdb1
19f0f43
b0c6f3c
50c1f3f
b343124
77e14e1
0d83634
cd202de
3b91002
159b37d
1150fbc
51b6337
af8d53f
3ebf3c5
d10843b
c3f2e2e
497c80b
0c9b0a2
c3de72a
3f7ac6e
7d4ebfd
168e79d
b7f61af
1239b59
40b80c7
0420092
4b27d11
9fe4cd2
b1a5b48
80c55b6
29f635a
7f96771
336fc40
eb50cea
41da0cf
019e04f
809020b
4d0b691
411e398
2069e16
8b7bf34
ffc56c7
3edbb91
fc809f7
4aefce8
a3e832c
2d2b39b
c0c1ab4
56199c7
8875d10
d8ec481
8487d7b
d0ea0cf
5be6d10
24880bd
b95de5d
fdc3df1
d718e97
43c4b8d
39ad030
5953591
5dc9c57
9e008a0
7bb9391
e91cef1
016f5df
2e71996
cb8c84d
b7277e4
c9088a1
e422d60
6fc709b
a65a696
5c1a97b
3d32576
6f52f0c
4057375
cb83f97
8877267
0ccfb93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -38,6 +38,6 @@ | |||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
BEGIN; | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SQL syntax change from
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||
ALTER TABLE rag_data_source ALTER COLUMN chunk_overlap_percent INTEGER DEFAULT 10; | ||||||||||||||||||||||||||||||||||||
ALTER TABLE rag_data_source ALTER COLUMN chunk_overlap_percent SET DEFAULT 10; | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
COMMIT; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP) | ||
* (C) Cloudera, Inc. 2025 | ||
* All rights reserved. | ||
* | ||
* Applicable Open Source License: Apache 2.0 | ||
* | ||
* NOTE: Cloudera open source products are modular software products | ||
* made up of hundreds of individual components, each of which was | ||
* individually copyrighted. Each Cloudera open source product is a | ||
* collective work under U.S. Copyright Law. Your license to use the | ||
* collective work is as provided in your written agreement with | ||
* Cloudera. Used apart from the collective work, this file is | ||
* licensed for your use pursuant to the open source license | ||
* identified above. | ||
* | ||
* This code is provided to you pursuant a written agreement with | ||
* (i) Cloudera, Inc. or (ii) a third-party authorized to distribute | ||
* this code. If you do not have a written agreement with Cloudera nor | ||
* with an authorized and properly licensed third party, you do not | ||
* have any rights to access nor to use this code. | ||
* | ||
* Absent a written agreement with Cloudera, Inc. ("Cloudera") to the | ||
* contrary, A) CLOUDERA PROVIDES THIS CODE TO YOU WITHOUT WARRANTIES OF ANY | ||
* KIND; (B) CLOUDERA DISCLAIMS ANY AND ALL EXPRESS AND IMPLIED | ||
* WARRANTIES WITH RESPECT TO THIS CODE, INCLUDING BUT NOT LIMITED TO | ||
* IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND | ||
* FITNESS FOR A PARTICULAR PURPOSE; (C) CLOUDERA IS NOT LIABLE TO YOU, | ||
* AND WILL NOT DEFEND, INDEMNIFY, NOR HOLD YOU HARMLESS FOR ANY CLAIMS | ||
* ARISING FROM OR RELATED TO THE CODE; AND (D)WITH RESPECT TO YOUR EXERCISE | ||
* OF ANY RIGHTS GRANTED TO YOU FOR THE CODE, CLOUDERA IS NOT LIABLE FOR ANY | ||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR | ||
* CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, DAMAGES | ||
* RELATED TO LOST REVENUE, LOST PROFITS, LOSS OF INCOME, LOSS OF | ||
* BUSINESS ADVANTAGE OR UNAVAILABILITY, OR LOSS OR CORRUPTION OF | ||
* DATA. | ||
*/ | ||
|
||
package com.cloudera.cai.util.db; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
class RdbConfigTest { | ||
|
||
@Test | ||
void buildDatabaseConnectionString() { | ||
|
||
var url = | ||
"jdbc:postgresql://rag-dev-testing.cluster.us-west-2.rds.amazonaws.com:5432/rag?username=foo&password=bar"; | ||
|
||
var rdb = | ||
RdbConfig.builder().rdbUrl(url).rdbDatabaseName("postgres").rdbType("PostgreSQL").build(); | ||
var result = RdbConfig.buildDatabaseServerConnectionString(rdb); | ||
assertThat(result) | ||
.isEqualTo( | ||
"jdbc:postgresql://rag-dev-testing.cluster.us-west-2.rds.amazonaws.com:5432/postgres?username=foo&password=bar"); | ||
} | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex pattern for PostgreSQL URL parsing is complex and could benefit from a comment explaining its structure and what each group captures for future maintainability.
Copilot uses AI. Check for mistakes.