Auto Loader bringing NULL Records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi
I am using auto loader to fetch some records stored in two files. Please see below my code. It fetches records from two files correctly and then it starts fetching NULL records. I attach option("cleanSource", ) to readStream. But it is not working and does not create directory "/FileStore/archive" as shown below. Please help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi subhas,
How are you doing today?, As per my understanding, It looks like the issue is happening because you're using /FileStore, which isn’t fully supported by Autoloader’s cleanSource option. Even though the code looks mostly fine, Autoloader expects the source and archive paths to be in DBFS or cloud storage (like S3 or ADLS), not /FileStore, which is more like a local scratch space. That’s likely why it’s not moving files to the archive folder and ends up reading them again, leading to those NULL records. I’d suggest switching your paths to something like /tmp/auto_loader and /tmp/archive, or use full DBFS paths like /dbfs/tmp/.... Once that’s in place, Autoloader should be able to archive the files properly and avoid reprocessing. Let me know if you want help updating those paths!
Regards,
Brahma

