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:ย 

what api calls does autoloader make on s3?

SakuraDev1
New Contributor II

Hey guys I'm trying to find the estimate for an ingestion pipeline that uses autoloader on an S3 bucket every 2 minutes.

I found the pricing for s3 bucket api consumption but I am not certain what api calls will autoloader make.

Talking to chatGPT it told me i will have a List call per execution and then a get call per file per execution, but i am not certain of this answer

spark.readStream
    .format("cloudFiles")
    .option("cloudFiles.format", "json")
    .schema(json_schema_bronze)
    .load("s3://path")

dfBronze.writeStream \
    .format("delta") \
    .option("checkpointLocation", checkpoint_dir_path_bronze) \
    .outputMode("append") \
    .trigger(processingTime="120 second") \
    .table(bronze_table)

 

1 ACCEPTED SOLUTION

Accepted Solutions

filipniziol
Contributor III

Hi @SakuraDev1 ,

LIST and GET make sense.

How autoloader works is monitors a specified location and then if the new file is discovered, it is being processed to bronze table.

So a LIST request is needed to check the files in the source directory, and then this list of files is compared against the list of already processed files. The unprocessed files are then loaded into bronze table. For every file you need a GET request to read the file and its content.

View solution in original post

2 REPLIES 2

filipniziol
Contributor III

Hi @SakuraDev1 ,

LIST and GET make sense.

How autoloader works is monitors a specified location and then if the new file is discovered, it is being processed to bronze table.

So a LIST request is needed to check the files in the source directory, and then this list of files is compared against the list of already processed files. The unprocessed files are then loaded into bronze table. For every file you need a GET request to read the file and its content.

Hey @filipniziol,

Thanks for the response, I've been trying to find some docs about this with no luck so far, do you happen to know any? 

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