i had a table named xyz in mysql Aurora DB, which has Table_Name, Table_ID,QuerySeq,sql_query,view_name.
Now i need to read the table in pyspark, run the sql queries(using spark.sql) present in sql_query according to QuerySeq and create a view for the sql_query from the view_name coulmn.
Then it needs to persist the view.
If view is not present it just needs to run the query using spark.sql statement
tried looping through seq number and run the queries
2
Answers