You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: