Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: odbc load a large table, hitting max obs limit
From
tashi lama <[email protected]>
To
<[email protected]>
Subject
RE: st: odbc load a large table, hitting max obs limit
Date
Thu, 6 Sep 2012 20:25:07 +0000
Did you ever experience any issue loading columns with type varchar from mysql?
.odbc list
Data Source Name Driver
-------------------------------------------------------------------------------
Indigo MySQL
----------------------------------------
.odbc query indigo
------------------------------------------------------------
address
readership
------------------------------------------------------------
.odbc desc readership
------------------------------------------------------------
readership_id bigint
doc_title varchar
read_date datetime
------------------------------------------------------------
.odbc load, exec("select * from readership limit 2")
note: doc_title is of a type not supported in Stata;skipped
I am running Stata/SE 12 32-bit installed in CentOS 6.3
Thanks
Tashi
> Date: Thu, 6 Sep 2012 13:07:38 -0700
> Subject: st: odbc load a large table, hitting max obs limit
> From: [email protected]
> To: [email protected]
>
> 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/
*
* 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/