輸入數據使SQL查詢
+---------+----------------+-----------+-----------------+--------------+------+
| country | tgtschema_name | tablename | tgttableversion | col_function | flag |
+---------+----------------+-----------+-----------------+--------------+------+
| zz | abc_zz | table1 | 01 | TBD1 | no |
+---------+----------------+-----------+-----------------+--------------+------+
| bs | abc_bs | table2 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| bs | abc_bs | table3 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| bs | abc_bs | table4 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| bs | abc_bs | table4 | 02 | TBD2 | no |
+---------+----------------+-----------+-----------------+--------------+------+
| do | abc_do | table5 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| do | abc_do | table6 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| do | abc_do | table7 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
輸出所需的數據
+---------+----------------+-----------+-----------------+--------------+------+
| country | tgtschema_name | tablename | tgttableversion | col_function | flag |
+---------+----------------+-----------+-----------------+--------------+------+
| zz | abc_zz | table1 | 01 | TBD1 | no |
+---------+----------------+-----------+-----------------+--------------+------+
| bs | abc_bs | table2 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| bs | abc_bs | table3 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| bs | abc_bs | table4 | 02 | TBD2 | no |
+---------+----------------+-----------+-----------------+--------------+------+
| do | abc_do | table5 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| do | abc_do | table6 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
| do | abc_do | table7 | 01 | TBD1 | yes |
+---------+----------------+-----------+-----------------+--------------+------+
如果我在國內多條記錄,tgtschema_name和表名列然後我需要有一個記錄其標誌爲「否」。
它的Hive數據庫 – Atul