I have a cassandra table - test:
+----+---------+---------+
| id | country | counter |
+====+=========+=========+
| A | RU | 1 |
+----+---------+---------+
| B | EN | 2 |
+----+---------+---------+
| C | IQ | 1 |
+----+---------+---------+
| D | RU | 3 |
+----+---------+---------+
Also I have a table main in the same space with column "country_main" and "main_id". In column main_id I have same ids as in test table, and also I have some unique ids. country_main has empty values and the same as in test. For ex:
+---------+--------------+---------+
| main_id | country_main | ...|
+=========+==============+=========+
| A | | ...|
+---------+--------------+---------+
| B | EN | ...|
+---------+--------------+---------+
| Y | IQ | ...|
+---------+--------------+---------+
| Z | RU | ...|
+---------+--------------+---------+
How to insert data from test table to main using pyspark to fill empty values in country_main according to ids?