-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af62620
commit 4e18333
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/.idea/ | ||
*.iml | ||
/helm/charts/ | ||
/helm/Chart.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import os | ||
|
||
import oracledb | ||
|
||
connection = oracledb.connect( | ||
dsn="db-nodo-pagamenti.d.db-nodo-pagamenti.com/NDPSPCT_PP_NODO4_CFG", | ||
port=1522, | ||
user=os.environ['SPRING_DATASOURCE_USERNAME'], | ||
password=os.environ['SPRING_DATASOURCE_PASSWORD'] | ||
) | ||
|
||
print("Successfully connected to Oracle Database") | ||
|
||
print("Creating cursor...") | ||
cursor = connection.cursor() | ||
print("Cursor created") | ||
|
||
print("Executing query...") | ||
mapping = [] | ||
i = 0 | ||
sqlQuery = str(""" | ||
SELECT | ||
p.ID_PSP, | ||
p.ABI | ||
FROM | ||
NODO4_CFG.PSP p | ||
WHERE | ||
p.ID_PSP NOT LIKE '%CHARITY%' | ||
ORDER BY p.ID_PSP | ||
""") | ||
|
||
for row in cursor.execute(sqlQuery): | ||
mapping.append(row) | ||
i += 1 | ||
|
||
connection.close() | ||
|
||
print("Found {} bundles that match the query".format(i)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Flask==3.0.0 | ||
oracledb==1.4.2 |