Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: pspang78Here's some background ...
EXTRACT
I use the "JDBC Query" to retrieve sample data
TRANSFORM
I use multiple different nodes to manipulate the data
LOAD
Update the same table using the PK
I'm current stuck at the last leg (LOAD). I've tried using the following:
1. JDBC Execute
BRX Description
node:4d38fc59050615bb
type:binary
name:OCMS+v2%2E8%2ETest
inputut1=4d38dc2752a16485.out1
prop:ls.brain.node.doPreviews=1,0
prop:ls.brain.node.java.SQLRunner.SQLQuery=<<EOX
query = "UPDATE Appointments Set Subject=:1 where id=:2"
sqlNonSelect(query,Subject,Id)
EOX
prop:ls.brain.node.java.SQLRunner.DBUser=sa
prop:ls.brain.node.java.SQLRunner.DBPassword=maske d
prop:ls.brain.node.java.SQLRunner.DBURL=jdbc:sqlse rver://ppc-ss-01
prop:ls.brain.node.java.SQLRunner.DBDriver=com.ncr .teradata.TeraDriver
prop:ls.brain.node.java.nodeClass=com.lavastorm.br ain.node.SQLRunner
prop:binary=javaNode.py
end:4d38fc59050615bb
Error Log
Exited with non zero status
Installing log (01/21/2011 16:01:55) ...
2011-01-21 16:01:55; Level: 3; Type: 0; Desc: "error on row 0. com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '='."; File: "SQLRunner.java"; Line: 217; Context: "nodeMain"
Uninstalling log (01/21/2011 16:01:55) ...
Error: property ls.brain.node.java.logLevel set incorrectly (set to 2)Error: Allowed values are Critical, Error, Warning, Info, DebugError: Using Warning
2. DB Execute
BRX
node:4d38d924031470e9
type:binary
name:OCMS+v2%2E8%2EDB+Execute
input:Appointments=4d38dc2752a16485.out1
prop:ls.brain.node.doPreviews=1,0
prop:ls.brain.node.sqlRunner.OutputExprFile=<<EOX
;line 1
(bs-set "query" "UPDATE Appointments Set Subject=:1 where id=:2")
;line 2
(sql-non-select $query 'Subject' 'Id')
EOX
prop:ls.brain.node.sqlRunner.dbUser=sa
prop:ls.brain.node.sqlRunner.dbPassword=masked
prop:ls.brain.node.sqlRunner.dbService=ppc-ss-01
prop:ls.brain.node.sqlRunner.dbInterface=cli
prop:binary=nodeDbExec
end:4d38d924031470e9
Error Log
ERROR initializing expert output:
Unable to load library 'wincli32': The specified module could not be found.
Installing log (01/21/2011 15:56:23) ...
2011-01-21 15:56:23; Level: 2; Type: 0; Desc: "Unable to load library 'wincli32': The specified module could not be found."; File: "\src\brain_d\jigsaw\Code\Source\Misc\JLibrary.cpp "; Line: 125; Context: "JLibrary::OpenLibrary() - Win32 Impl"
2011-01-21 15:56:23; Level: 2; Type: 0; Desc: "...exception seen"; File: "\src\brain_d\ra_dev\code\source\expert\SqlExprUti ls.cpp"; Line: 163; Context: "Salmon::NED::SqlExprUtils::InitializeDB()"
2011-01-21 15:56:23; Level: 2; Type: 0; Desc: "...handling expression #2 in file"; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableIo .cpp"; Line: 86; Context: "Salmon::NED::ExprTableIo::initialize()"
2011-01-21 15:56:23; Level: 2; Type: 0; Desc: "...exception seen"; File: "\src\brain_d\ra_dev\code\source\brain\NodeControl .cpp"; Line: 1152; Context: "Salmon::NED::NodeControl::initializeExpert()"
Uninstalling log (01/21/2011 15:56:23) ...
I suspect I didn't use "DB Execute" properly. Since I manage to extract data using "JBDC Query", I'm hoping to use "JDBC Execute" to update the records.
Can you please tell me where I did wrong?
The table has 6 fields - Id (int), Body (string), End (date), Location (string), Start (date), Subject (string)