QuestionQ151

VerifiedDevelopment and Ingestion

A data engineer needs to parse only png files in a directory that contains files with different suffixes.

Which code should the data engineer use to achieve this task?

Explanation

When using Databricks Auto Loader (cloudFiles format), the pathGlobfilter option is the correct approach to filter files by suffix pattern. This option accepts wildcard patterns like '*.png' to parse only specific file types from a directory containing mixed file types. The path option provides prefix filtering only, so pathGlobfilter is required for suffix-based filtering.

Community Discussion

No comments yet. Be the first to start the discussion!