I am trying to replicate below code which I got from EEL documentation. When I used in Data Flux Expression node in Expression( not in pre or post expression) it is loading more records then actual number of tables.
string DSN DSN="DataFlux Sample" string connectStr //Preparing the connection string connectStr = "DSN=" & DSN DBConnection dbConn dbConn = dbConnect( connectStr ) string tablename string datapath string tcatalog string tabletype DBCursor cursTables //Retrieve table information in a cursor cursTables = dbConn.tablelist(); //Iterate through the cursor while( cursTables.next() ) begin datapath = cursTables.valuestring(0);
tcatalog =cursTables.valuestring(1);
tablename = cursTables.valuestring(2); tabletype = cursTables.valuestring(3) pushrow() end cursTables.release();
When I use call print("Table Name" &tablename ) instead of pushrow() then it only prints 10 table names in the log. Can anyone please explain why this is happening?
Also, a solution to this?
My goal is to use this concept to create a control table with all table names. Then extract data from all those tables using iterative method.
Thanks,
Rama
Hi
This code should work fine, if you paste it into the pre processing section of an expression node and add the following options
seteof(true) // since GENERATE_ROWS is specified, this avoids infinite loop
return false // avoids duplicate row at end, since pushrow() is used
Hope that helps
Hi
This code should work fine, if you paste it into the pre processing section of an expression node and add the following options
seteof(true) // since GENERATE_ROWS is specified, this avoids infinite loop
return false // avoids duplicate row at end, since pushrow() is used
Hope that helps
Thanks Vincent.
It works.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.