uranusjr commented on code in PR #50828:
URL: https://github.com/apache/airflow/pull/50828#discussion_r2098503636
##########
airflow-core/src/airflow/example_dags/tutorial_objectstorage.py:
##########
@@ -114,7 +117,10 @@ def analyze(path: ObjectStoragePath, **kwargs):
conn = duckdb.connect(database=":memory:")
conn.register_filesystem(path.fs)
- conn.execute(f"CREATE OR REPLACE TABLE airquality_urban AS SELECT *
FROM read_parquet('{path}')")
+ s3_url = path.path
+ conn.execute(
+ f"CREATE OR REPLACE TABLE airquality_urban AS SELECT * FROM
read_parquet('{path.protocol}://{s3_url}')"
+ )
Review Comment:
```suggestion
s3_path = path.path
conn.execute(
f"CREATE OR REPLACE TABLE airquality_urban AS SELECT * FROM
read_parquet('{path.protocol}://{s3_path}')"
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]