garf-executors 0.1.4__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {garf_executors-0.1.4 → garf_executors-0.1.5}/PKG-INFO +1 -1
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/__init__.py +1 -1
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/entrypoints/cli.py +6 -3
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/sql_executor.py +2 -1
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors.egg-info/PKG-INFO +1 -1
- {garf_executors-0.1.4 → garf_executors-0.1.5}/README.md +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/api_executor.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/bq_executor.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/config.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/entrypoints/__init__.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/entrypoints/server.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/entrypoints/tracer.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/entrypoints/utils.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/exceptions.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/execution_context.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/executor.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/fetchers.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors/telemetry.py +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors.egg-info/SOURCES.txt +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors.egg-info/dependency_links.txt +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors.egg-info/entry_points.txt +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors.egg-info/requires.txt +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/garf_executors.egg-info/top_level.txt +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/pyproject.toml +0 -0
- {garf_executors-0.1.4 → garf_executors-0.1.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: garf-executors
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Executes queries against API and writes data to local/remote storage.
|
|
5
5
|
Author-email: "Google Inc. (gTech gPS CSE team)" <no-reply@google.com>, Andrei Markin <andrey.markin.ppc@gmail.com>
|
|
6
6
|
License: Apache 2.0
|
|
@@ -117,14 +117,17 @@ def main():
|
|
|
117
117
|
enable_cache=args.enable_cache,
|
|
118
118
|
cache_ttl_seconds=args.cache_ttl_seconds,
|
|
119
119
|
)
|
|
120
|
-
if args.parallel_queries:
|
|
120
|
+
if args.parallel_queries and len(args.query) > 1:
|
|
121
121
|
logger.info('Running queries in parallel')
|
|
122
122
|
batch = {query: reader_client.read(query) for query in args.query}
|
|
123
123
|
query_executor.execute_batch(batch, context, args.parallel_threshold)
|
|
124
124
|
else:
|
|
125
|
-
|
|
125
|
+
if len(args.query) > 1:
|
|
126
|
+
logger.info('Running queries sequentially')
|
|
126
127
|
for query in args.query:
|
|
127
|
-
query_executor.execute(
|
|
128
|
+
query_executor.execute(
|
|
129
|
+
query=reader_client.read(query), title=query, context=context
|
|
130
|
+
)
|
|
128
131
|
logging.shutdown()
|
|
129
132
|
|
|
130
133
|
|
|
@@ -25,6 +25,7 @@ except ImportError as e:
|
|
|
25
25
|
|
|
26
26
|
import logging
|
|
27
27
|
import re
|
|
28
|
+
import uuid
|
|
28
29
|
|
|
29
30
|
import pandas as pd
|
|
30
31
|
from garf_core import query_editor, report
|
|
@@ -95,7 +96,7 @@ class SqlAlchemyQueryExecutor(
|
|
|
95
96
|
conn.connection.executescript(query_text)
|
|
96
97
|
results = report.GarfReport()
|
|
97
98
|
else:
|
|
98
|
-
temp_table_name = f'temp_{
|
|
99
|
+
temp_table_name = f'temp_{uuid.uuid4().hex}'
|
|
99
100
|
query_text = f'CREATE TABLE {temp_table_name} AS {query_text}'
|
|
100
101
|
conn.connection.executescript(query_text)
|
|
101
102
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: garf-executors
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Executes queries against API and writes data to local/remote storage.
|
|
5
5
|
Author-email: "Google Inc. (gTech gPS CSE team)" <no-reply@google.com>, Andrei Markin <andrey.markin.ppc@gmail.com>
|
|
6
6
|
License: Apache 2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|