I have the following code:
PROJECT_ID = 'test'
BQ_TABLE_NAME_CATEGORIES = 'categories'
BQ_TABLE_NAME_MANUFACTURERS = 'manufacturers'
list = [BQ_TABLE_NAME_CATEGORIES, BQ_TABLE_NAME_MANUFACTURERS]
table_categories = PROJECT_ID + '.' + BQ_TABLE_NAME_CATEGORIES
table_manufacturers = PROJECT_ID + '.' + BQ_TABLE_NAME_MANUFACTURERS
for table in list:
....
source_objects=['table_{0}'.format(table)] #reference to the correct var
....
This however puts string inside source_objects. I want it to reference the variables (whatever is saved in the variables)
meaning what I actually want is equivalent of this:
When table = BQ_TABLE_NAME_CATEGORIES
source_objects = [ table_categories ]
When table = BQ_TABLE_NAME_MANUFACTURERS
source_objects = [ table_manufacturers ]
table_categoriesinside a list? Or do you just want to reference it's string value?listobject.