Quantcast
Channel: Teradata Downloads - Connectivity
Viewing all 445 articles
Browse latest View live

JDBC auto refresh

$
0
0

I'm building my firsh Java application using Teradata as the backend database. I would like to impliment an auto refresh feature, that would monitor a table in the database for changes and refresh the tableview I have in the application. I know TMM has an auto refresh. Does anyone know how this is accomplished?
Thanks for the help in advanced!
 
-Also I have had several people mention using a timer. That is like saying, do you want your email every 15 min, or do you want it pushed. I want it pushed.

Tags: 
Forums: 

Article On Teradata Connectors for Hadoop (Java API) version

$
0
0

Hello All,
 
I am currently in the process of developing a complete end-end solution that will migrate objects/data from Teradata to Hadoop and vise versa.
 
When researched, i got the articles on TERADATA CONNECTORS FOR HADOOP (COMMAND LINE INTERFACE) and their respective  tutorial document.
 
 
I am looking for the JavaAPI version of it, so that I can work them to provide some functionalities relavent to my business requirements.
I have come to write this post, after searching on such topics/articles or how-to documents.
 
Please help me with the details.

Forums: 

Connection string of Teradata for Asp.net

$
0
0

  Hi,
    I want put teradata connection strng inside the web.config file and open it in .net code behind to access Teradat. I tried as belo
 <add name="TDCnnString" connectionString="DataSource=xxx.xxx.com;Initial Catalog=yyy; User ID=xxx; Password=xx123"/>
  And in code behind

 string sUser = ConfigurationManager.ConnectionStrings["TDCnnString"].ConnectionString;

 

        using (OdbcConnection cons = new OdbcConnection())

        {

          cons.ConnectionString = sUser;

          cons.Open();

        }

 

Also tried

 

string sUser = ConfigurationManager.ConnectionStrings["TDCnnString"].ConnectionString;

 

        using (TdConnection cons = new TdConnection())

        {

          cons.ConnectionString = sUser;

          cons.Open();

        }

But in both cases not able to open connection string. So what is the reason or should I need o change web.config connection string
 
Please guide me.
 
Thanks,
Mahendra

Forums: 

Excel and Multistatement SQL Passthrough

$
0
0

Hello,
Long time lurker, first time poster here.  Over the last 6 months, I taught myself SQL, and built a SQL Server database that pulled data from Teradata and then compiles and processes that data with data from other sources.  I would then pull that compiled data from SQL Server into Excel using long SQL strings (20+ pages of code) that would allow for complex analytics.  This work landed me a new role.
In my new role I am attempting to do the same but since all of my data lives in teradata I no longer need to remove it from the system to process it.  As such I have been attempting to do all the analytics in teradata and extract it straight to excel as I have done in the past from SQL Server.  

Writing the code to support the analytics has not been an issue.  My issue is that I want to use the ODBC connector of excel to connect to teradata and extract this data using the SQL Script I write in SQL Assistant.

What I have found is that for single statement SQL queries, this is not an issue.  However, for multistatemetn sql queries, I am entirely unable to get these to run inside of excel.  
Attempted Solutions:
1)I have found articles about ANSI vs Teradata mode in the ODBC connector and neither seems to help the problem.
2) I have looked into implicit and explicit commits and tried that and no go.
3) I have tried to create a stored procedure to get around this restriction and received error messages that would make it seem I do not have access (my idea was to just call a complex query instead of trying to upload it in multiple statements).
4) I have tried to set the sql statement as a text script and to execute the text script, also to no avail.

As such I have to ask, is this possible?  Am I just inexperienced with Teradata and am overlooking the obvious?  Is it possible at all to pass through a multistatement SQL string from excel and get teradata to process the data and spit it back?
Any help at all would be so greatly appreciated.

Forums: 

OSX ODBC driver and Excel

$
0
0

Hi,
 
I've just installed Teradata ODBC driver on OS X and everything went smooth. But Excel says that there are no ODBC drivers installed in the system.
I configured DSNs and checked that ini files are there. Still the same error.
What else can be checked and/or configured to get it working?
 
Thx

Forums: 

TITLEDASHES OFF

SAS connection to Teradata - Logical Server

$
0
0

Hello
I'm tryin to define a SAS connection to Teradata
I Installed the module "SAS to Teradata" and Teradata client on my SAS server.
Since SAS Management Console, i trying to create a logical server , the connection requires the parameter "account number" (is not the user account)
You know what kind of identifier refers?
Can you help me?
Thanks!
 
 

Forums: 

Slow Record Loading into Teradata - with or without PK

$
0
0

I am trying to use the bulk load method using TDCommandBuilder in C# and also compare it to the individual insert statement performance using the following code. I move data back and forth between SQL Server and Teradata. I see speeds of several million rows per minute in SQL Server using sqlcommandbuilder versus about 50000 a minute in Teradata with  or without tdcommandbuilder. What am I doing wrong here? I am using Teradata driver version 14.0.0.0. Thank you.

                using (TdConnection connection = connect())        // initialize connection
                {


                    // set all required for batch elements and fill the schema
                    DataTable dtInsertBatch = new DataTable();
                    TdDataAdapter adapter = new TdDataAdapter();
                    adapter.SelectCommand = connection.CreateCommand();

                    adapter.SelectCommand.CommandText = "SELECT " + String.Join(", ", getColumnNames(loadData)) + " FROM " + tableName;

                    adapter.FillSchema(dtInsertBatch, SchemaType.Source);

                    if (null != _monitor) _monitor.onLogMessage(dtInsertBatch.Columns.Count + " columns populated into source schema using " + Environment.NewLine + adapter.SelectCommand.CommandText, "TeradataFastloadAdapter.insert");

                    if (0 == dtInsertBatch.PrimaryKey.Length)   // if no PK then set own insert command
                    {
                        if (null != _monitor) _monitor.onLogMessage("No primary key detected. Will insert using individual insert statements", "TeradataFastloadAdapter.insert");


                        TdCommand insertCommand = connection.CreateCommand();

                        insertCommand.CommandType = CommandType.Text;
                        insertCommand.CommandText = "INSERT INTO " + tableName + "(" +
                                                    String.Join(", ", getColumnNames(loadData)) + ")"
                                                    + " VALUES (" + String.Join(", ", getColumnNamesAsParameters(loadData)) +
                                                    ")";

                        foreach (DataColumn colParm in loadData.Columns)
                        {
                            // add new parameter
                            insertCommand.Parameters.Add(colParm.ColumnName, colParm.DataType);
                        }

                        if (null != _monitor) _monitor.onLogMessage("Starting insert into " + tableName, "TeradataFastloadAdapter.insert");
                        updateCount = 0;
                        // insert one by one
                        insertCommand.Transaction = connection.BeginTransaction();
                        foreach (DataRow row in loadData.Rows)
                        {
                            foreach (TdParameter parm in insertCommand.Parameters)
                            {
                                parm.Value = row[parm.ParameterName];
                            }
                            if (1 != insertCommand.ExecuteNonQuery())
                            {

                                insertCommand.Transaction.Rollback();
                                if (null != _monitor) _monitor.onLogMessage("Error: Individual statement number " + updateCount + "/" + loadData.Rows.Count + " failed to complete", "TeradataFastloadAdapter.insert");
                                throw new Exception("Unable to load all records using individual statement calls");
                            }
                            updateCount++;
                        }

                        insertCommand.Transaction.Commit();

                    }
                    else      // insert using builder when PK is present
                    {
                        if (null != _monitor) _monitor.onLogMessage("Primary key detected. Will use batch load to insert records", "TeradataFastloadAdapter.insert");

                        TdCommandBuilder builder = new TdCommandBuilder(adapter);
                        adapter.SelectCommand.Transaction = connection.BeginTransaction();

                        // add rows to insert
                        dtInsertBatch.Merge(loadData);

                        foreach (DataRow dataRow in dtInsertBatch.Rows)
                            if (dataRow.RowState == DataRowState.Unchanged) dataRow.SetAdded();

                        if (null != _monitor) _monitor.onLogMessage("Starting batch insert into " + tableName, "TeradataFastloadAdapter.insert");

                        updateCount = adapter.Update(dtInsertBatch);

                        if (updateCount != dtInsertBatch.Rows.Count)
                        {
                            if (null != _monitor) _monitor.onLogMessage("Error: Expected insert count is " + loadData.Rows.Count + " but actual is " + updateCount, "TeradataFastloadAdapter.insert");
                            throw new Exception("Unable to load all records using batch load");
                        }
                        else
                        {
                            if (null != _monitor) _monitor.onLogMessage("Batch insert successfully inserted " + updateCount + " rows", "TeradataFastloadAdapter.insert");
                        }

                        adapter.SelectCommand.Transaction.Commit();
                    }
                }

 

Forums: 

how to resolve the weird data when using the Teradata-connector-1.3.3 to export data from Teradata to HDFS

$
0
0

Hi All,
I am using teradata-connector-1.3.3 with the following versions:
->Teradata 15.0
->HDP 2.1
I am trying to import data from teradata tables to HDFS.
I create a table in the Teradata database.

CREATE MULTISET TABLE martinpoc.example3_td3 ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      c1 INTEGER,

      c2 VARCHAR(100) CHARACTER SET UNICODE NOT CASESPECIFIC)

PRIMARY INDEX ( c1 );
I insert a data with Chinese word into this table.

INSERT INTO  martinpoc.example3_td3(c1,C2) VALUES ('1','蔡先生');
I run the command call the teradata connector to export data from teredata to HDFS

hadoop com.teradata.hadoop.tool.TeradataImportTool -libjars $LIB_JARS -url jdbc:teradata://192.168.65.132/CHARSET=UTF8,database=martinpoc -username martinpoc -password martin -jobtype hdfs -sourcetable example3_td3 -separator ',' -targetpaths /user/martin/example3_td3 -method split.by.hash -splitbycolumn c1
I success to export the data from teradata to HDFS, but I found the Chinese word in the HDFS is weird.
Do you have the same experience and how to resolve it.
thanks and Best Regard
Martin
 

Forums: 

Connecting to Teradata is very solwly(5 sec)

$
0
0

That's my code below, I connected to Teradata used java JDBC but It took 5 sec to do "stmt = conn.createStatement();".

Could anyone help me to fix this problem?

 

 

 

CODE

public class dw_targetmonthjdbc {

 

List<dw_targetmonth> tmList = new ArrayList<dw_targetmonth>();

 

public List<dw_targetmonth> tmjdbc() throws ClassNotFoundException {

Connection conn = null;

Statement stmt = null;

try {

 

String connurl="jdbc:teradata://192.168.206.1";

Class.forName("com.teradata.jdbc.TeraDriver");

conn=DriverManager.getConnection(connurl, "dwauto", "dwauto");

 

stmt = conn.createStatement();

 

String strSelect ="select A.* FROM dw_targetmonth A inner join (SELECT  monthcode, Max(DTLDate) as dtldate FROM dw_targetmonth GROUP BY monthcode) B on A.monthcode=B.monthcode and A.dtldate=B.dtldate";

 

ResultSet rset = stmt.executeQuery(strSelect);

 

System.out.println("The records selected are:");

int rowCount = 0;

 

while (rset.next()) { 

dw_targetmonth tmsc = new dw_targetmonth();

tmsc.setMonthcode(rset.getString("monthcode"));

tmsc.setTargetmonthstore(rset.getDouble("targetmonthstore"));

tmsc.setDtldate(rset.getDate("dtldate"));

 

tmList.add(tmsc);

}

 

} catch (SQLException ex) {

ex.printStackTrace();

} finally {

 

try {

if (stmt != null)

stmt.close(); // This closes ResultSet too

if (conn != null)

conn.close();

} catch (SQLException ex) {

ex.printStackTrace();

}

}

return tmList;

 

}

 

}

 

Forums: 

Does TeraJDBC works with JDK/JRE 8 version?

$
0
0

From the latest version of TeraJDBC .It's currently works with JDK/JRE 1.4.2, 5.0, 6.0, or 7.0.
Is there any TeraJDBC version that is supporteed and works with JRE8?

Forums: 

centos 6.4 + tdodbc 15 getting error: 110 Unable to get catalog string.

$
0
0

Hi all, hoping someone can help. I've got a clean CentOS 6.4 box and I'm trying to connect it to Teradata. My first step is to install ksh then I install the tdodbc 15 packages: tdicu, tdodbc, TeraGSS. Then I copy the /opt/teradata/client/ODBC_64/odbc*.ini files to my home dir, prepending the '.' and edit the files for my Teradata credentials and DBC.
I test the connection using /opt/teradata/client/15.00/odbc_64/bin/tdxodbc and I'm returned this error:
adhoc: (SQL Diagnostics) STATE=HYT00, CODE=110, MSG=[Teradata][Unix system error]  110 Unable to get catalog string.
 
What should I try next? Thanks in advanced. 

Forums: 

Connect to TD using public network and private network

$
0
0

Hi,
What is the difference between connecting to TD DB using a public network and private network ? Recently, we had an issue in which we were able to connect to TD Db using private network and not through public network. What type of connection does an etl use to connect to TD Db ? Can someone point me to the reference manual for more details on this ?
Thanks !
Samir

Forums: 

Where is SQL Assistant located in TTU 15?

$
0
0

I downloaded TTU 15 today and need to install the SQL Assistant 15. I can't seem to locate it in any of the folders...

Forums: 

When do we use 'oracle' in create foreign server statment's hosttype?

$
0
0

When connecting TD14 with Oracle 11 or 12, I've read that USL 15 allows connecting them with a portal server in between. When creating the foreign server, hosttype would normally be 'portal' as that's what's in the middle between TD and Oracle. In what scenario would we use hosttype 'oracle'? 
Thanks
Peter

Forums: 

Setting up ODBC Driver setup parameters and ODBC Driver options globally.

$
0
0

Hi All,
Good Day...
Can some one help me to set up ODBC Driver for Teradata options (Especially, Password & Data Encryption and Authentication Mechanisms) globally and these optios should not be overwritten by user at ODBC Data Source Administrator dialog box.
Means, end users who connects to TD databse through ODBC connectivity can modify the ODBC Driver setup parameters and ODBC Driver options (like, Intigrated security, Mechanism, Parameters, Data Encryption etc...). But I need to set up these parameters and options at server level for each DSN and those options should not be modified by the user at ODBC Data Source Administrator dialog box.
Please help me to find the solution for the above problem. This needs to be implemented for Tableau desktop system whch connects to Teradata through ODBC. 
 
Thanks in advance.
Srini.

Forums: 

Unable to connect to AMC

$
0
0

I have tried connecting to the AMC many times but I am unable to connect to AMC. I typed the IP address  and tried and still did not work . I tried connecting from different locations, using different browsers and still the same result..  I do not use VPN at all. I even downloaded the Aster software one more time and tried but no change then either. I asked another person to try from his laptop and still the same result I am not sure what else I need to do. I would appreciate any troube shooting help on this. 
Thanks!

Forums: 

Import in UTF-8 from Teradata to Pentaho

$
0
0

Hi, guys!
I have been breaking my mind the whole day trying to do the following thing.
My native language is Spanish and I need to import some words which have accents. I got to upload those words properly in Teradata setting the upload to UTF8.
But then, when I execute an export query ussing SET SESSION CHARSET UTF-8, the results are exported in ANSI, as I see using Notepad++ & Encoding. 
I already changed the language setting in the .sh and .bat files of Pentaho, but I think my problem is that I am not being able to bring the data in UTF-8 format. Is there anyway to export in UTF-8 format? 
Furthermore, I tried to execute an SQL Script in Pentaho just to run the SET SESSION CHARSET UTF-8, but It launched an error.
Thanks a lot!

Forums: 

Password encryption mechanism for ODBC client application users.

$
0
0

Hi All,
Can someone help me to understand more about password encryption with respect to ODBC client applications. As far as I know, password will be encrypted and stored in the database table by default. But, I've seen an option 'gtwcontrol' which needs to be set as 'YES' at gtw cotrol utility to enable password encryption. As the password encrypted and stored in TD tables by default for ODBC client application users what is the advantage of this gtwcontrol option? please clarify.
 
Thanks & Regards,
Srini. 
 

Forums: 

RHEL7 Teradata client 15.00 cannot connect: Specified driver could not be loaded

$
0
0

Hi all,
I am currently trying to configure Teradata 15.0 client on a RHEL7 machine.  First I installed tdicu, TeraGSS, then tdodbc.  Then I edited the .odbc* to my Teradata credential and DBC etc. The .odbc.ini and .odbcinst.ini are at my $HOME dir.
When I test the connection using tdxodbc, the following error return:
[ags@Dev03273 msg]$ export NLSPATH=/opt/teradata/client/15.00/odbc_64/msg/tdodbc.cat
[ags@Dev03273 msg]$ cd ../bin/
[ags@Dev03273 bin]$ ./tdxodbc

Enter Data Source Name: teragdb4
Enter UserID: qatest1
Enter Password:

Connecting with SQLConnect(DSN=teragdb4,UID=qatest1,PWD=*)...

adhoc: (SQL Diagnostics) STATE=IM003, CODE=0, MSG=[DataDirect][ODBC lib] Specified driver could not be loaded

ODBC connection closed.
 
If someone know what configuration I did wrong?
 

Forums: 
Viewing all 445 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>