BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Rama_V
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
VincentRejany
SAS Employee

Hi

 

This code should work fine, if you paste it into the pre processing section of an expression node and add the following options

  1. set the option "Generate rows when no parent is specified" in the node settings
  2. add the following in the expression section

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

View solution in original post

2 REPLIES 2
VincentRejany
SAS Employee

Hi

 

This code should work fine, if you paste it into the pre processing section of an expression node and add the following options

  1. set the option "Generate rows when no parent is specified" in the node settings
  2. add the following in the expression section

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

Rama_V
Obsidian | Level 7

Thanks Vincent.

It works.

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 2 replies
  • 1614 views
  • 0 likes
  • 2 in conversation