Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: odbc load a large table, hitting max obs limit


From   "Dimitriy V. Masterov" <dvmaster@gmail.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: odbc load a large table, hitting max obs limit
Date   Thu, 6 Sep 2012 13:07:38 -0700

I am trying to load a very large table from a Teradata database. It's
slower than molasses on a cold winter morning, and then gives me an
error message that I have exceeded the maximum number of observations.
However, the table only contains only 55% of that limit in terms of
rows (1,186,316,312 out of a theoretical 2,147,483,647). I have Stata
MP 12.1 on a powerful Linux machine  with 1 TB of RAM, so I hoped I
could get close to the theoretical limit.

I get the number of rows from this command:
odbc load, exec("select count(*) as num_obs from DbName.TableName;")
dsn("DsnName") lowercase sqlshow clear;

This works:
odbc load, exec("select top 100 * from DbName.TableName;")
dsn("DsnName") lowercase sqlshow clear;

This does not:
odbc load, exec("select * from DbName.TableName;") dsn("DsnName")
lowercase sqlshow clear;

When I tried the alternative:
odbc load, table("DbName.TableName") dsn("DsnName") lowercase sqlshow clear;
SELECT * FROM "DbName.TableName""
The ODBC driver reported the following diagnostics
[Teradata][ODBC Teradata Driver][Teradata Database] Name requires more
than 30 bytes in LATIN internal form.
SQLSTATE=HY090

Obviously, I've changed the DB and table names to protect the
innocent. Any ideas about how to get this to work?

DVM
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index