Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-warehouse): explain an s3 files url pattern that matches no files (#123762)

Tom Owers9aae4c92ea23
diff --git a/products/data_warehouse/backend/models/test/test_table.py b/products/data_warehouse/backend/models/test/test_table.py
index bd8f48e63942..fbed1eb9fa25 100644
--- a/products/data_warehouse/backend/models/test/test_table.py
+++ b/products/data_warehouse/backend/models/test/test_table.py
@@ -972,7 +972,7 @@ class TestTable(BaseTest):
(
"Cannot extract table structure from CSV format file, because there are no files with "
"provided path in S3 or all files are empty",
- "doesn't exist in the bucket",
+ "No files match your Files URL pattern",
),
("Cannot extract table structure: the file is empty", "contains no data"),
]
@@ -1263,7 +1263,13 @@ class TestTable(BaseTest):
"empty_csv",
"Cannot extract table structure from CSV format file, because there are no files with provided path in S3 or all files are empty",
499,
- "The provided file doesn't exist in the bucket",
+ "No files match your Files URL pattern",
+ ),
+ (
+ "empty_csv_with_names",
+ "Cannot extract table structure from CSVWithNames format file, because there are no files with provided path in S3 or all files are empty",
+ 499,
+ "No files match your Files URL pattern",
),
(
"corrupted_parquet_thrift",
diff --git a/products/warehouse_sources/backend/models/table.py b/products/warehouse_sources/backend/models/table.py
index 1551c1f7083f..d99a27a9c167 100644
--- a/products/warehouse_sources/backend/models/table.py
+++ b/products/warehouse_sources/backend/models/table.py
@@ -104,9 +104,8 @@ ExtractErrors = {
"Could not list objects in bucket": "Access was denied to the provided bucket. Check that the provided credentials can list this bucket (s3:ListBucket), then try again.",
"file is empty": "The provided file contains no data",
"The specified key does not exist": "The provided file doesn't exist in the bucket",
- "Cannot extract table structure from CSV format file, because there are no files with provided path in S3 or all files are empty": "The provided file doesn't exist in the bucket",
- "Cannot extract table structure from Parquet format file, because there are no files with provided path in S3 or all files are empty": "The provided file doesn't exist in the bucket",
- "Cannot extract table structure from JSONEachRow format file, because there are no files with provided path in S3 or all files are empty": "The provided file doesn't exist in the bucket",
+ # ClickHouse names the format in this message (CSV, CSVWithNames, Parquet, ...), so match the shared tail.
+ "there are no files with provided path in S3 or all files are empty": "No files match your Files URL pattern, or all the matching files are empty. Check the folder path and wildcards, then try again.",
"Bucket or key name are invalid in S3 URI": "The provided file or bucket doesn't exist",
"S3 exception: `NoSuchBucket`, message: 'The specified bucket does not exist.'": "The provided bucket doesn't exist",
"Either the file is corrupted or this is not a parquet file": "The provided file is not in Parquet format",