astro-sdk
astro-sdk copied to clipboard
File object should work event without filetype param
Describe the bug If I'm passing a folder path URI in File object it throws error
Broken DAG: [/usr/local/airflow/dags/task_flow.py] Traceback (most recent call last):
File "/usr/local/airflow/astro_sdk/src/astro/files/types/__init__.py", line 25, in create_file_type
filetype = get_filetype(path)
File "/usr/local/airflow/astro_sdk/src/astro/files/types/__init__.py", line 53, in get_filetype
raise ValueError(
ValueError: Missing file extension, cannot automatically determine filetype from path 'gs://pankaj_test_dtt/'. Please pass the 'filetype' param with the explicit filetype (e.g. csv, ndjson, etc.).
Version
- Astro: [e.g. 0.6.0]
- OS: [eg. Debian]
To Reproduce Steps to reproduce the behavior:
- Write the DAG '...'
- Create connection '....'
- Run using '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Discussion: https://github.com/astronomer/astro-sdk/pull/596#discussion_r943415100
duplicate https://github.com/astronomer/astro-sdk/issues/644