Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dynamic Query #118

Open
Open
@deezelmunky

Description

I'm trying to write a program that modifies Teradata Table definitions to add Partitions as required. I would like to pull table and database names from a control table for starters and creating a show table SQL statement. My question is how can I feed the session.execute() function variables e.g. table and database names to export table definitions from Teradata. Here is what I have so far just to give a better idea:

with udaExec.connect("${dataSourceName}") as session:
for row in session.execute("SELECT * FROM ${table}"):
if row[2] == 'C':
print('Table has been purged')
elif row[2] == 'A':
for definition in session.execute ("SHOW TABLE "{row[0]}"."{row[1]}";"):
print(definition)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /