I have task to convert .mdb files to .csv files. with the help of the code below I am able to read only one table file from .mdb file. I am not able to read if .mdb files contains more than one table and I want to store all the files individually. Kindly help me on this.
object mdbfiles {
    Logger.getLogger("org").setLevel(Level.ERROR)
    val spark = SparkSession.builder().appName("Positional File Reading").master("local[*]").getOrCreate()
     val sc = spark.sparkContext // Just used to create test RDDs
     def main(args: Array[String]): Unit = { 
         val inputfilepath = "C:/Users/phadpa01/Desktop/InputFiles/sample.mdb"
         val outputfilepath ="C:/Users/phadpa01/Desktop/sample_mdb_output"
         val db = DatabaseBuilder.open(new File(inputfilepath))
         try  {
             val table = db.getTable("table1");
            for ( row <- table) {
                //System.out.println(row)
                val opresult = row.values()
            }
        } 
    }
}
 
     
     
     
    