Hi All,
I have exported data from Oracle database into Sas table, after I've tried to lead the data into CAS in Viya , i got this error message
The exported table contains a column with rows of Blobs, representing PDF's intended to be analyzed in Viya::
ERROR: BASE Data Connector, Cross Environment Data Access (CEDA) translation failed. Some character data was lost during transcoding while loading the table. Either the data contains characters that are not representable in the new encoding or truncation occurred during transcoding. The charMultiplier= import option may prevent the error.
ERROR: BASE Data Connector failed.
In other words how to load a sas table with blobs into CAS without getting this message ?
another question is how to deal with blobs ( contained in columns ) with Viya if there is no solution to this ?
Thank you for your response.
What kind of SAS dataset are you creating that supports BLOBs?
the table is created using sql statement in SAS, importig oracle table
What SAS version are you using to import the Oracle BLOB data? If it is SAS 9.4 this link may be helpful:
Note, SAS 9.4 can only hold blobs up to 32K (32,767) bytes in length. Truncation will occur if the BLOBs are any bigger.
The system options statement:
option CASNCHARMULTIPLIER=4;
...can be used to handle some transcoding errors and possibly address the BLOB issue, since SAS sees that as a large CHAR data type. I had to use the above for just loading a Viya table from a Windows 2012 Server-based 9.4M6 platform to a Viya 3.4 platform. It cleared up the errors messages and allowed the loads to continue. A full implementation of this established before the caslib and session in EG would be:
option CASNCHARMULTIPLIER=4;
options CASHOST="server.domain.us" CASPORT=5570 ;
cas sessCon;
caslib myCASLib SESSREF=sessCon datasource=(srctype="path") path="/sasdata/departments/daily/data" GLOBAL;
proc casutil outcaslib="myCASLib";
load data=srcelib.Daily_Transactions promote;
run;
cas sessCon terminate;
In DI Studio if you are using the CAS Loader transform, you would place the CASNCHARMULTIPLIER system option in the "System Options" field, Additional Options* section, under the Options tab...
Thanks for this. This error was driving me crazy. Not really the same use case, but I was getting it in Viya 2021.2.2, and this is how I implemented the charMultiplier:
proc casutil;
load casdata="XXX.sas7bdat" casout="XXX"
importoptions=(filetype="basesas", dtm="auto", debug="dmsglvli", charMultiplier=4) ;
run;
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.