Questions tagged [teradatasql]

The Teradata SQL Driver for Python (or related drivers). For Teradata (Vantage) database questions, use the [teradata] tag instead.

The Teradata SQL Driver for Python is a DBAPI Driver that enables Python applications to connect to the Teradata Database. The Teradata SQL Driver for Python implements the PEP-249 Python Database API Specification 2.0.

It is available from PyPI or Teradata's public download site and is used by the Teradata Python Package (teradataml) and the Teradata SQL Driver Dialect for SQLAlchemy (teradatasqlalchemy) to connect to a Teradata DBMS, aka Teradata Vantage SQL Engine. This driver is also leveraged by the Vantage Modules for Jupyter and is closely related to the Teradata SQL Drivers for R and Node.js.

272 questions
0
votes
0 answers

Finding Datatype mismatches or translations in Teradata queries

I'm planning to analyse the queries where there are datatype mismatches or translations  (example: Numeric joining to Strings) occurring during joins or Filters.We have a lot of tables which users create for their own usage and I want to capture…
0
votes
0 answers

Sql join concept - performance tunning

In below teradata SQL code I want to join 3 different columns from table A (col1,col2,col3) with employee table's name column. Below operation working fine but want to perform this operation within one join, can we do that with alternate way to…
0
votes
0 answers

Updating huge tables in Teradata

I am trying to Update a huge table in Teradata on a daily basis. The Update Statement is taking a lot of AMPCPUTime. Table contains 65 Billion rows and 100-200 Million Rows are updated. Table is a Set Table with Non Unique PI. The data distribution…
Ankit Srivastava
  • 185
  • 3
  • 13
0
votes
1 answer

Slow performance reading teradata table in python

I'm trying to read a table from Teradata big it takes a lot of time.  My table has 5 millions of rows and 60 columns and it took 30 minutes to load in memory. I'm using teradatasql package, but the same table took 5 minutes to load in R with RJDBC…
C.Lopez
  • 1
  • 1
  • 3
0
votes
0 answers

inverted triangle using Teradata stored procedure

I want inverted triangle using teradata sql. I have written below recursive query and getting the output. But i want to print inverted triangle using stored procedure . with recursive atr_col(id, val) AS ( sel 1, cast('' as varchar(1000)) as…
0
votes
1 answer

Connect python to teradata without the driver, on unix

I am using python 3.x and unix for accessing teradata. I am totally new to teradata and python. I could easily connect to oracle with python but for teradata there is this no driver issue coming. I will not be able to do any unix side installations…
0
votes
1 answer

Teradata conversion of timestamp(0) to AM/PM format

I have one table with below data. Data type of START_TIME is timestamp(0) & AVG_RUN_TIME_MINS is Integer. I want to print EXPECTED_COMPLETION_TIME which is equal to - (START_TIME + AVG_RUN_TIME_MINS) and output will be in format like - '10:00 AM' or…
0
votes
0 answers

Pyodbc bulk insert into Teradata table

How do I insert 10-50k+ rows (from e.g. Series or Dataframe) into a Teradata table effectively with Pyodbc? Background: I am building a GUI app in Python No Teradata libraries can be used (as I fail to package the software with those libs)
dady7749
  • 125
  • 3
  • 11
0
votes
0 answers

How to set the SAMPLE size in Teradata SQL by query

I'm working with Teradata Studio and I'm looking for a way to make the following code more maintainable, instead of this: SELECT * FROM Table SAMPLE WHEN Language = 'german' THEN 500 WHEN Language = 'french' THEN 600 END I…
0
votes
1 answer

Teradata timestamp value adjustments

Can someone please help me implementing below 2 requirements where i am currently stuck now: I need help in calculating & populating field 'DURATION_CROSSED_AFTER_SLA' in minutes only when STATUS of the job is 'IN PROGRESS' and it is greater than…
0
votes
0 answers

Duplicates causing performance issues in teradata

Suppose multiset table A in teradata has 10 (just example-there can be > 100k rows) rows. All rows are full row duplicate. I have logically deleted 9 rows with active_date as closed (current timestamp). Now table A has 10 rows but only 1 row is…
0
votes
0 answers

Caused by [Version 17.0.0.2] [Session 8085885] [Teradata SQL Driver] Failure receiving Start Response message header

I am doing an insert query using the teradatasql module with python and getting this error. I am trying to run multiple scripts simultaneously and I guess I cannot do multiple insert queries at the same time? Traceback (most recent call last): …
Jonathan Lam
  • 1,237
  • 3
  • 20
  • 49
0
votes
1 answer

Teradata SQL assistant

How to perform below operation using teradata, Input string- 'data1 data2 (1) (Ab-123)' output required- Ab-123 So basically I want data from last bracket.
0
votes
2 answers

How can I get only the data that do not match

I have the query below, TBL1 X is my source table and TBL2 Y is my target table. I want to get only the data from TBL1 X that any of the fields indicated below don't match their corresponding fields in TBL2 Y. I am not a 100% sure that the code is…
0
votes
1 answer

How to set query bands in teradatasql lib?

I was using this teradata module and then I've changed to this new one. The fact is, in the old one, it was easy to set queryband by setting queryBands parameter in udaExec.connect function. In this new module I was not able to find a simple way to…
O Pardal
  • 647
  • 4
  • 21