There are several fields in my Teradata installation which are BIGINT, in EG these fields do not ever show up. I have to do a data describe on each table to see the error in the log to find the missing fields. Is there a SAS Access engine patch to fix this? I also need to know when SAS will be able to read Teradata table and column names greater than 30 or 32 characters in length.
Hi Bwasicak,
SAS cannot read the BIGINT data types. There are a couple of ways to handle it.
The first is to have your DBA create views which CAST the BIGINT columns to a character data type (@LinusH's recommendation). You can do this, without creating Teradata views, using explicit pass-thru.
I have pulled some slides covering using SAS with Teradata BIGINT from a workshop that I used to deliver. Hopefully, they will help. If the slides require clarification please let me know.
Be careful with TRUNCATE_BIGINT. Doing calculations using BIGINT columns could very well be problematic because you can get incorrect answers.
According to SAS/ACCESS doc, bigint is not supported, hence nor showing up when using libname.
You could go around this by using SQL pass-thru and cast bigint values to a SAS supported data type.
For a normal analyst this could be a complicated operation. Sp you should talk to your TD DBAs an ask them to create views with datatypes supported by SAS.
The same solution apply to your second requirement.
There are suggestions on the forum regarding enhancing SAS to better read table names and columns greater than 32 characters from external databases in general - not just Teradata. Table names are the most problematic as the only workaround to read them is to use SQL passthru. Long column names can usually be read by most methods and are simply truncated to 32 characters and are automatically suffixed with a number if they don't remain unique.
I too would be interested in hearing about any plans SAS may have in this area. To date I have not heard of any.
Hi Bwasicak,
SAS cannot read the BIGINT data types. There are a couple of ways to handle it.
The first is to have your DBA create views which CAST the BIGINT columns to a character data type (@LinusH's recommendation). You can do this, without creating Teradata views, using explicit pass-thru.
I have pulled some slides covering using SAS with Teradata BIGINT from a workshop that I used to deliver. Hopefully, they will help. If the slides require clarification please let me know.
Be careful with TRUNCATE_BIGINT. Doing calculations using BIGINT columns could very well be problematic because you can get incorrect answers.
Good to hear handling of long table names are being looked at!
Hello - has any of this changed in the past year, or is this the recommended way to get bigint values into SAS, along with the limitations and caveats?
Thanks
Loren
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.