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

Teradata: I need to check the count of rows in a table and if the count is more than 1, i need to run an update query

I need to check the count of rows in a table and if the count is more than 1, i need to run an update query. Is there any way i can do it without using a bteq script in teradata sql assistant? The sequence should be something like below Select…
anusha
  • 1
0
votes
0 answers

Teradata fast load file (csv, excel) into table with system date load date column

My question is can Teradata have a column in a table where when your loading a file(excel, csv) it will add the date you loaded that file into that table. I have researched this and supposedly it can be done but it does not work. I have done this in…
0
votes
0 answers

Adding multiple columns using CASE statement and '+' but function not adding correctly

I am trying to add the values of multiple columns together and then derive an indicator (Yes or No) if the summed value is greater or equal to 1. My query is below: select case when column1 + column2 + column3 >= 1 Then 'Yes' ELSE 'No' end as…
Brasi
  • 11
  • 2
0
votes
0 answers

Teradata Temporal Table migration

Teradata Temporal Table migration to Snowflake. I am doing migration of Teradata database to Snowflake using infoworks. I want to move my Teradata Temporal Tables as well while maintaining the consistency. How can I achieve this?
0
votes
1 answer

Limit Results to Previous 7 days Monday to Sunday each week

I wan to limit my results everytime to to the previous 7 days, but this query always throws an error and does not seem to be working as intended: SELECT DD.DATE_DATE AS Rcv_Date, elig.PL_PREMIUMDESC, …
Josh Moorish
  • 113
  • 9
0
votes
1 answer

How to apply multiple whereclause in sqlalchmey in dask while fetching large dataset from teradata

I am trying to fetch larger dataset from teradata using dask and sqlalchmey. I am able to apply single whereclause and able to fetch data.below is the working code td_engine = create_engine(connString) metadata = MetaData() t = Table( "table", …
Reetesh Nigam
  • 133
  • 2
  • 2
  • 15
0
votes
0 answers

Is there any solution to following error "Object name contains restricted error"?

I am trying to create a duplicate table using following query: CREATE TABLE folder.table1  AS  SELECT * FROM folder.original_table; CREATE TABLE folder.table1  AS folder.original_table WITH DATA; However, after execution i am getting "Object name…
Rahul Kumar
  • 139
  • 3
  • 10
0
votes
0 answers

Insert Into Big Table Performance Optimization In Teradata

Daily ETL process is trying to load incremental data into Teradata Table containing Billions of rows. Table is a SET table with Non Unique PI. Direct Dump from Stage table to Target is taking high AMP CPU Time. Changed the target table to Multi Set,…
Ankit Srivastava
  • 185
  • 3
  • 13
0
votes
1 answer

Teradata: expected something like ',' between an integer and the word

I'm trying to create a table and I get the error. Could someone please let me know how to add a column which has an integer starting in its name. Find below the statement and error Create table mutablecode ( 4th_Procedure_Code…
user12852650
0
votes
0 answers

SQL: Gathering count of users who have not logged in past but have logged in reporting week

I am trying to gather a count of users by mobile platform who haven't logged in the past but may have logged in the reporting week. For this I have built two virtual tables, with reporting_date - it is Saturday of each week, cust_id, app_logins,…
0
votes
1 answer

Teradata handling single digit month and day problem

I have below values coming from a flat file which may contain single digit month & day field: 9/14/2020 07:20:18.630000 7/7/2020 16:24:57.700000 10/24/2019 03:40:52.380000 11/9/2020 20:21:32.420000 Now I need to load this to a column having…
0
votes
0 answers

Expecting something between ')' and the 'AS' keyword

I am trying to run the update query below in Teradata but getting an error message 'Expecting something between ')' and the 'AS' keyword. I am missing anything? I have checked some previous update and it worked for other developers in my company. …
0
votes
2 answers

Teradata TD_NORMALIZE not helping with combining adjacent periods

I thought using CTE and TD_NORMALIZE_MEET would help me out. I have multiple rows, say **FIELD1 | FIELD2 | FIELD3 | FIELD4 | START_DT | END_DT** abcd1 | efgh1 | hijk1 | lmno1 | 2019/09/23 | 2019/09/30 abcd1 …
AK2016
  • 1
  • 1
0
votes
1 answer

Install teradatasql for R 4.0.2

I try to install teradatasql as explained here: https://github.com/Teradata/r-driver#Installation However, it immediately throws this…
0
votes
1 answer

How to pick the string after last underscore in Teradata sql

I need to pick that portion of a string column in Teradata sql that appears after the last underscore. If the string is blank, it must return blank. The string can have multiple underscores. input output abc_def_ghi ghi…
Regressor
  • 1,843
  • 4
  • 27
  • 67