I am new in SparkR. I am trying to write a query on a dataset using SparkR using Qubole Notebook. several process taken but not getting the output.
Data: Table_A
ID Name month year
1 A 2 2020
2 B 2 2019
3 c 12 2019
Desired Output:
ID Name month year
1 A 2 2020

Variables:
month_value= 2
year_value = 2020
Process 1:
temp_data = sql("
select *
from Table_A
where month = $month_value and year = $year_value")
Process 2:
temp_data = sql(s"
select *
from Table_A
where month = $month_value and year = $year_value")
Process 3:
temp_data = sql("
select *
from Table_A
where month = {0} and year = {1}".format(month_value,year_value))
Process 4:
temp_data = sql("
select *
from Table_A
where month = ${month_value} and year = ${year_value}")
How to pass the variables in spark SQL, using SparkR?