cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Autoloader directory listing not listing all files

FabriceDeseyn
Contributor

Hi community

I have an Autoloader pipeline running with following configuration. Unfortunately, it does not detect all files. (see below query definition).

image.pngimage.png 

The folder that needs to be read has 38.246 files that all have the same schema and structure.:

image.pngIf I look at the `cloud_files_state`, I see get 4999 files. Do I do something wrong? Is this an 'initial' count that will be increased if these files are ingested?

image.png

1 ACCEPTED SOLUTION

Accepted Solutions

Lakshay
Esteemed Contributor
Esteemed Contributor

Hi @Fabrice Deseyn​ , My understanding is that this could be because Autoloader returns a fixed no. of results per API call as explained here: https://docs.databricks.com/ingestion/auto-loader/directory-listing-mode.html#how-does-directory-lis...

View solution in original post

5 REPLIES 5

daniel_sahal
Esteemed Contributor

@Fabrice Deseyn​ 

It looks like your storage is not prepared for incremental listing. Use normal Directory Listing to get all of the files.

https://docs.databricks.com/ingestion/auto-loader/directory-listing-mode.html#date-partitioned-files

@Daniel Sahal​ 

Thanks, apparently I looked over the useIncrementalListing setting... big mistake from my side...

Thanks for the second pair of eyes!

So, I changed the code (also tried with False) and have put a new checkpoint. This however still keeps giving me the same amount of files.

image.png 

Lakshay
Esteemed Contributor
Esteemed Contributor

Hi @Fabrice Deseyn​ , My understanding is that this could be because Autoloader returns a fixed no. of results per API call as explained here: https://docs.databricks.com/ingestion/auto-loader/directory-listing-mode.html#how-does-directory-lis...

Anonymous
Not applicable

Hi @Fabrice Deseyn​ 

Thank you for posting your question in our community! We are happy to assist you.

To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?

This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance! 

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!