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
1 answer

regular expression in Teradata query

I have below input strings: string1: xyx;;;;str1=P1:P2|str2=1/3|str3=s1:s2 string2: mzn;;;;str1 = P3:P4 | str2 = 2/5 result expected: for string1: str1_val=P1:P2 str2_val=1/3 for string2: str1_val=P3:P4 str2_val=2/5 I tried with str1_val=…
0
votes
0 answers

Teradata function to format number not working

I have this in my select statement: CAST(AVG( CASE WHEN nps.nps_score < 7 THEN -1 WHEN nps.nps_score > 8 THEN 1 ELSE 0 END )*100 AS FORMAT 'ZZ9%') AS NPS The problem is, the format isn't applied, the column return…
0
votes
2 answers

Not all rows getting loaded by using the fastload utility in Teradata from CSV file to a table from Teradata SQL assistant?

I am practicing to use Fastload/ Multiload utility in teradata to load a sample Credit card data which has around 1500000 records. The data get loaded unto 49k records and ends with an error "MaxErr49923".I have enclosed the load utility screenshot…
0
votes
0 answers

Teradata create date range window based on previous rows

Teradata DB I am having a rough go at it. I have a dataset and I want to create a customer journey. The rules are that the first transaction is a journey. The next transaction that is at least 30 days out is a journey. The next transaction at…
0
votes
0 answers

Add numeric column to a date column in teradata

I have a problem in Teradata: add a numeric column as months to a date to get a new date column below an exmple: in input i have a|dat 5|2020-02-15 4|2020-09-01 i want in output a|dat|dat_f 5|2020-02-15|2020-07-15 4|2020-09-01|2021-01-01 i tried…
Mado.h
  • 17
  • 4
0
votes
1 answer

Query contains parameters but import file contains different values [importing csv to Teradata SQL]

I am using Teradata SQL to import a CSV file. I clicked import to activate the import operation, then typed the following insert into databasename.tablename values(?,?,?,...) I made sure to specify the database name as well as what I want the table…
pynewbee
  • 665
  • 3
  • 9
  • 19
0
votes
1 answer

A different kind of running total in Teradata

I have seen tickets about running totals, but this is a little different. Let's say I have claims from January 2020 to max(date). I want to write a query to give me the claims totals for January 2020, then January to February 2020, then January to…
carljong2019
  • 97
  • 2
  • 6
0
votes
2 answers

How to query from a list like : [1,1,1,2,3,4,2,2,5,3]

I want to query only numbers which are repeated 3 times consecutively like 1 here. But not 2 as it is not consecutive. How can i achieve same in sql?
Kshitish Das
  • 67
  • 1
  • 7
0
votes
1 answer

Convert a row into multiple rows based on column value

I have a table with employees logging hours history, it has employee ID, Clock in time, Clock out time. I need to convert this row into multiple row for the number of hours clocked. If an employee clocked between 10:00am and 6:00pm i need to have 8…
Parthi
  • 1
0
votes
1 answer

Problem with converting character string to date in Teradata

Relatively new to Teradata. I have a table that appears to have been imported from Excel with everything as character. I'm trying to convert a character timestamp to either a timestamp or date--as long as I can calculate time intervals (days,…
Brian Head
  • 57
  • 4
0
votes
0 answers

How to identify Skewness of a SQL in Teradata

I need to identify the Skewness of some SQL's in Teradata. These are different SQL statement like, CREATE Volatile Table using multiple Tables and involving Multiple Left Join INSERT SQL from Table and involving multiple LEFT Join I verified if…
Ankit Srivastava
  • 185
  • 3
  • 13
0
votes
1 answer

Reading large volume data from Teradata using Dask cluster/Teradatasql and sqlalchemy

I need to read large volume data(app. 800M records) from teradata, my code is working fine for a million record. for larger sets its taking time to build metadata. Could someone please suggest how to make it faster. Below is the code snippet which I…
0
votes
1 answer

Summary table in Teradata SQL

I have the following table in Teradata SQL, called transactions_data: User_ID Trans_Date Amount Purchased 3134 2012-08-12 3.35 3135 2012-08-12 4.47 3134 2012-08-13 4.45 What I am…
Thomas Moore
  • 941
  • 2
  • 11
  • 17
0
votes
1 answer

INSERT Failed. 3800: Datatype Mismatch in THEN/ELSE expression

INSERT Failed. 3800: Datatype Mismatch in THEN/ELSE expression. i'm facing this error in SQL tera data
zain qazi
  • 21
  • 1
  • 1
  • 5
0
votes
0 answers

Install Teradatasql on Microsoft R Open (MRO) 3.5.3

Official Teradata Download Site and it's Github counterpart say Teradata's R driver requires R 3.4.3+. BUT, trying to install on Microsoft R Open 3.5.3 raise the below teradatasql_16.20.0.38.tar.gz Error : package ‘digest’ 0.6.18 was found, but…
PaoloC
  • 3,817
  • 1
  • 23
  • 27