I am trying to create a python list with multiple variables that will then be used as values in a for loop that loops through a sql query that creates multiple tables but I can't seem to find an example that shows a parameter that is used multiple times.
list = ["a","b","c"]
for x in list:
sql = '''
create volatile table test_{} as (
select * from database.tablename_{}
) with data on commit preserve rows;
create volatile table test2_{} as (
select * from database.tablename2_{}
) with data on commit preserve rows;
'''
display(sql)