I have an input file which has data as shown below:
name,local_unit,region_unit
AAAAA,hour,cell
BBBBB,15min,cell
Here is my shell
#!/bin/bash
file_path='/home/vikrant_singh_rana/test_bq_file.csv'
{
read
while IFS=, read -r name local_unit region_unit
do
echo $name
echo $local_unit
echo $region_unit
ingest_tablename=ABC_XYZ_$name
echo $ingest_tablename
aggr_tablename=ABC_XYZ_$name_$local_unit_$region_unit_aggregation
echo $aggr_tablename
done
} < $file_path
It is able to populate the table name for variable ingest_tablename
and not for aggr_tablename
Output as shown below:
AAAAA
hour
cell
ABC_XYZ_AAAAA
ABC_XYZ_
BBBBB
15min
cell
ABC_XYZ_BBBB
ABC_XYZ_