AmanSehgal
Honored Contributor III

Read all the files using auto loader and add an additional column as follows:

.withColumn("filePath",input_file_name())

Now that you've file name, you can split the data frame as per your requirement and ingest data into different tables.