Skip to content

Commit

Permalink
Remove from standard sql tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Coetzee <[email protected]>
  • Loading branch information
Pipboyguy committed Apr 5, 2024
1 parent d454d8f commit fdd052a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dlt/destinations/impl/clickhouse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
def capabilities() -> DestinationCapabilitiesContext:
caps = DestinationCapabilitiesContext()
# Clickhouse only supports loading from staged files on s3 for now.
caps.preferred_loader_file_format = "jsonl"
caps.supported_loader_file_formats = ["parquet", "jsonl"]
caps.preferred_loader_file_format = "insert_values"
caps.supported_loader_file_formats = ["insert_values"]
caps.preferred_staging_file_format = "jsonl"
caps.supported_staging_file_formats = ["parquet", "jsonl"]

Expand Down
13 changes: 5 additions & 8 deletions dlt/destinations/impl/clickhouse/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from jinja2 import Template

import dlt
from dlt import config
from dlt.common.configuration.specs import (
CredentialsConfiguration,
AzureCredentialsWithoutDefaults,
Expand Down Expand Up @@ -241,13 +240,11 @@ def __init__(
)
elif not bucket_path:
# Local filesystem.
if not file_path:
raise LoadJobTerminalException(
file_path,
"If `bucket_path` isn't provided, then you must specify a local file path.",
)
print(file_path)
table_function = f"FROM INFILE '{file_path}' FORMAT {clickhouse_format}"
raise LoadJobTerminalException(
file_path,
"Cannot load from local file. Clickhouse does not support loading from local files."
" Configure staging with an s3, gcs or azure storage bucket.",
)
else:
raise LoadJobTerminalException(
file_path,
Expand Down
1 change: 0 additions & 1 deletion tests/load/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def destinations_configs(
destination_configs += [
DestinationTestConfiguration(
destination="clickhouse",
file_format="jsonl",
disable_compression=True,
)
]
Expand Down

0 comments on commit fdd052a

Please sign in to comment.