BookmarkSubscribeRSS Feed
SIgnificatif
Quartz | Level 8

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.

 

 

5 REPLIES 5
Tom
Super User Tom
Super User

What kind of SAS dataset are you creating that supports BLOBs?

SIgnificatif
Quartz | Level 8

the table is created using sql statement in SAS, importig oracle table

SASKiwi
PROC Star

What SAS version are you using to import the Oracle BLOB data? If it is SAS 9.4 this link may be helpful:

https://documentation.sas.com/?docsetId=acreldb&docsetTarget=p06jk0u30uhuj5n18fqw9sxr25lk.htm&docset...

 

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.

mtnbiker1120
Calcite | Level 5

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...

TrueNorthLLC
Fluorite | Level 6

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;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 5 replies
  • 3241 views
  • 1 like
  • 5 in conversation