I'm trying to get the appropriate values in this list of dictionaries, which includes calling classes from 'table_name'. But I keep getting multiple errors, currently I'm seeing:
copy_VE_to_s3 = {group: S3CopyObjectsOperator( TypeError: unhashable type: 'dict'
data_groups = [
{'name': 'commissions', 'dtype': 'snapshot_date', 'table_name': SkCommission},
{'name': 'clicks', 'dtype': 'date', 'table_name': SkClicks},
{'name': 'products', 'dtype': 'snapshot_date', 'table_name': SkProducts}
]
co_name = [
'VE',
'AB']
with dag:
with TaskGroup(group_id='group1') as tg1:
copy_VE_to_s3 = {group: S3CopyObjectsOperator(
task_id=f'copy_{group["name"]}_data_to_VE_s3',
partition=SkimlinksS3Partition(
location_base=f'VE/{group["name"]}',
obj=f'{group["name"]}',
),
dest_prefix=f'VE/{group["name"]}/{group["dtype"]}={ds}'
) for group in data_groups}