Skip to content

Commit 31faa1d

Browse files
fix(executors): don't performn file path expansion for remote queries
1 parent 92ad273 commit 31faa1d

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

libs/executors/garf/executors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def setup_executor(
5757
'ApiExecutionContext',
5858
]
5959

60-
__version__ = '1.0.6'
60+
__version__ = '1.0.7'

libs/executors/garf/executors/entrypoints/cli.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import argparse
2323
import logging
2424
import pathlib
25+
import re
2526
import sys
2627

2728
import garf.executors
@@ -104,10 +105,17 @@ def main():
104105
)
105106
for query in queries:
106107
if isinstance(query, garf.executors.workflow.QueryPath):
107-
query_path = wf_parent / pathlib.Path(query.path)
108-
if not query_path.exists():
109-
raise workflow.GarfWorkflowError(f'Query: {query_path} not found')
110-
batch[query.path] = reader_client.read(query_path)
108+
if re.match(
109+
'^(http|gs|s3|aruze|hdfs|webhdfs|ssh|scp|sftp)', query.path
110+
):
111+
batch[query.path] = reader_client.read(query.path)
112+
else:
113+
query_path = wf_parent / pathlib.Path(query.path)
114+
if not query_path.exists():
115+
raise workflow.GarfWorkflowError(
116+
f'Query: {query_path} not found'
117+
)
118+
batch[query.path] = reader_client.read(query_path)
111119
elif isinstance(query, garf.executors.workflow.QueryFolder):
112120
query_path = wf_parent / pathlib.Path(query.folder)
113121
if not query_path.exists():

0 commit comments

Comments
 (0)