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

loading teradata table using pandas taking so much time

Pandas gets ridiculously slow when loading more than 10 million records from a Teradata server using teradatasql and mainly the function pandas.read_sql(query,teradata_con). it takes 40-45 minutes to load 1-1.5 million records from teradata…
SKP
  • 151
  • 16
-1
votes
2 answers

How do I connect to teradata server from Debian 11 using teradatasql

When I try and connect to teradata, I get this error: OSError: /home/***/.local/lib/python3.8/site-packages/teradatasql/teradatasql.so: cannot open shared object file: No such file or directory I installed teradatasql using pip install…
-1
votes
2 answers

Like operator teradata

I am trying to find the data using like operator. I am new into it and unsure how to find data. Below is input and output that I require but with my query that I am getting dropdown also which I don't…
Sak
  • 61
  • 6
-1
votes
1 answer

Get first date that account-prod get discount sql

I have a huge volume of a history of transactions table with acc_nbr, tran_nbr, tran_amt, tran_dt, and tran_dis tran_prd I need to find the first date for each acc_nbr and tran_prd Find the First date When the account with this type of product…
Ghaida
  • 19
  • 1
-1
votes
1 answer

Teradata SQL code to find count between eff start and end date

I have a dataset that has 5 columns. Each account can have multiple rows. I need to group the data by C2 and Monthyear and find counts ACC_ID, C1 , C2, EFF_START_DATE, EFF_END_DATE 111 , 0 , A , 2018-01-01, 2499-12-31 222 , 0 , A , 2018-02-15 ,…
-1
votes
1 answer

How to compare results from sub query in main query

I want to compare results from subquery with the column in main query --this returns multiple rows select id, MAX(created_date) as maxdate from table group by id I want to use the result set in the another query to compare date (already exist in…
-1
votes
1 answer

CASE WHEN in WHERE clause to filter the dates

I'm super junior in SQL and trying to automate my date parameters in below the codes in Teradata: SELECT POST_DATE_YR, POST_DATE_MN, SERV_NAME, MARKET_NAME, COUNTRY_NAME FROM MY_TABLE WHERE CASE WHEN (EXTRACT(MONTH FROM CURRENT_DATE)+6)<=12 …
-1
votes
1 answer

Changing In to Exists in SQL - with DISTINCT

Having this one: code IN ( SELECT DISTINCT aaa.code FROM ORGHEADER AS aaa LEFT JOIN ORGRELATEDPARTY AS bbb ON aaa.oh_pk = bbb.parent WHERE aaa.oh_pk NOT IN ( SELECT fu.parent FROM ORGRELATEDPARTY fu WHERE fu.partytype = 'MNG' ) ) Reading…
Vityata
  • 42,633
  • 8
  • 55
  • 100
-1
votes
1 answer

How to calculate mean value per group in Teradata SQL?

have table in Teradata SQL like below: SMS_ID | PRODUCT ------------------- 11 | A 22 | A 33 | A 87 | B 89 | B 14 | C Column "SMS_ID" presents ID of SMS sent do client Column "PRODUCT" presents ID of product which was a…
dingaro
  • 2,156
  • 9
  • 29
-1
votes
1 answer

Teradatasql Python: Unable to pass column name

I'm using the teradatasql python module and i'm unable to find in documentation on how to pass named parameters into the cursor.execute() i have stored procedure which takes IN parameter , but in teradatasql i dont see option to pass column name. is…
user1591156
  • 1,945
  • 4
  • 18
  • 31
-1
votes
1 answer

How to select rows in Teradata SQL based on complicated conditions in Teradata SQL?

I have table in Teradata SQL like below: col1 col2 Jan Kowal | Jan Kowal PHU Bravo JohN | GB John BraVo Ann Still | Ronald G And I need to select only these rows from above table where: In col2 is value from col1 + something more…
dingaro
  • 2,156
  • 9
  • 29
-1
votes
1 answer

DATE BETWEEN issues

Trying to select data only between a range. select ITM_NBR, TOT_IVO_ITM_QTY, Count(*) FROM dataset WHERE bus_dt BETWEEN '2-14-2020' AND '2-15-2021' Failed conversion to numeric value. Tried without single ticks and it returned…
a.s.1
  • 39
  • 7
-1
votes
1 answer

How to combine 2 teradata queries into one

can someone please help me in combining these 2 Teradata queries into a single query? The tables - cdb.dim_party_doc_id, cdb.dim_doc_issuer, mdb.fp_account_entity_map do not have customer_account_number in them, so I not able to directly join all…
user3903418
  • 143
  • 1
  • 1
  • 11
-1
votes
3 answers

Finding MIN value with other conditions Teradata

I'm using Teradata SQL. I have a table with these columns orgprice - original price sprice - sale price saledate - sale date I need to find * date of the earliest sale in the database where the sale price of the item did not equal the original price…
Anant Sinha
  • 159
  • 1
  • 10
-2
votes
2 answers

Filter unwanted characters from a column in Teradata

I have a Phone number column in my table with values only being numbers and no special characters. for one of the column I got a value coming in as ":1212121212". I will need to filter this record and any records coming in with any special…
1 2 3
18
19