-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teradata "CTAS" error - BT/ET is not closed properly #35
Comments
We are getting similar error after “Collect Stats” query too. Please help to fix. |
@prabhu1984 Have you found a solution? The problem is that you are not committing the previous query. See http://docs.sqlalchemy.org/en/latest/core/connections.html#understanding-autocommit. |
I confirm that I face the same error with Collect Stats.
it fails with error:
It's like the commit statement is not taken into account.
And here is the piece of code which executes both create table and collect stats statements:
|
Hi Team,
ct
syntax to create table on sqlachemy-teradata is not working as expected.When I run
ct pp_scratch.temp_pxk as (select username from dbc.usersV) with data;
, it's getting successfully executed. But, when I run someselect sql
, its throwing error[Teradata][ODBC Teradata Driver][Teradata Database] Only an ET or null statement is legal after a DDL Statement. ')
When I deep dive, I found that it's adding
BT
before running thect
statement, but it's not addingET
after the statement execution. It's a DDL statement, so I expectET
would have been added implicitly, but not.Create Table
,Drop Table
are all working. The problem is withct
syntax.For more details, I attached the Jupyter notebook to provide more information.
Please let me know how to solve this issue.
How to reproduce this error?
sqlalchemy_teradata_ctas_error.pdf
The text was updated successfully, but these errors were encountered: