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
Databricks Employee
Databricks Employee

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
Databricks Employee
Databricks Employee

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! 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group