Problem Note 56446: Renaming a BY variable in a MERGE statement in PROC DS2 returns an error
The SAS® In-Database Code Accelerator enables you to publish a DS2 threaded program to the database and execute that threaded program in parallel inside the database. The available databases are Hadoop, Teradata, and Greenplum. Errors like the following can occur when the PROC DS2 code includes a MERGE statement with a RENAME clause that renames one or more of the BY variables:
ERROR: General error java.sql.SQLException: Error while compiling statement:
FAILED: SemanticException Failed to breakup Windowing invocations into Groups.
At least 1 group must only depend on input columns. Also check for circular dependencies.
ERROR: Failed to run DS2INDB.
ERROR: Error returned from tkedsPubINDBDS2.
Click the Full Code tab to see an example of the syntax that generates the errors.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows Server 2008 for x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 Std | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Enterprise 32 bit | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Enterprise x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Home Premium 32 bit | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Home Premium x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Professional 32 bit | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Professional x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Ultimate 32 bit | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Ultimate x64 | 9.4 TS1M3 | 9.4 TS1M4 |
64-bit Enabled AIX | 9.4 TS1M3 | 9.4 TS1M4 |
64-bit Enabled Solaris | 9.4 TS1M3 | 9.4 TS1M4 |
HP-UX IPF | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2008 R2 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2008 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 10 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Linux for x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Solaris for x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8 Pro x64 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft® Windows® for x64 | 9.4 TS1M3 | 9.4 TS1M4 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Before you run the sample code below, you need to issue a LIBNAME statement to your database with the appropriate options. The threaded PROC DS2 program can run inside Hadoop, Teradata, and Greenplum databases.
The errors occur when the RENAME= option is used in the MERGE statement for a BY variable.
libname hive1 HADOOP port=10000 schema=dev_123 host=abc user=test123;
proc ds2 ds2accel=yes bypartition=yes;
thread t_pgm / overwrite=yes;
method run();
merge hive1.ms2_tbl1(in=inTable1)
hive1.ms2_tbl2(rename = (pid3 AS pid2) IN = inTable2);
by pid1 pid2;
output;
end;
endthread;
data hive1.ms2_merged (overwrite=yes);
declare thread t_pgm t;
method run();
set from t;
end;
enddata;
run;
quit;
Type: | Problem Note |
Priority: | high |
Topic: | SAS Reference ==> Procedures ==> DS2
|
Date Modified: | 2015-11-05 15:18:55 |
Date Created: | 2015-08-19 08:54:21 |