quillsql 2.2.3__py3-none-any.whl → 2.2.4__py3-none-any.whl
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.
quillsql/core.py
CHANGED
|
@@ -129,13 +129,14 @@ class Quill:
|
|
|
129
129
|
return {
|
|
130
130
|
"status": "error",
|
|
131
131
|
"error": pivot_template_response.get("error"),
|
|
132
|
-
"data": pivot_template_response.get("metadata") or {},
|
|
132
|
+
"data": (pivot_template_response.get("metadata") or {}),
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
pivot_metadata = pivot_template_response.get("metadata") or {}
|
|
136
|
+
template = pivot_metadata.get("template")
|
|
137
|
+
config = pivot_metadata.get("config") or {}
|
|
138
|
+
distinct_values_query = pivot_metadata.get("distinctValuesQuery")
|
|
139
|
+
row_count_query = pivot_metadata.get("rowCountQuery")
|
|
139
140
|
|
|
140
141
|
# Step 2: Run the distinct values query to get unique values
|
|
141
142
|
distinct_values = []
|
|
@@ -180,10 +181,10 @@ class Quill:
|
|
|
180
181
|
self.target_connection.database_type,
|
|
181
182
|
metadata.get("databaseType"),
|
|
182
183
|
metadata,
|
|
183
|
-
|
|
184
|
+
pivot_metadata.get("runQueryConfig"),
|
|
184
185
|
)
|
|
185
186
|
|
|
186
|
-
responseMetadata =
|
|
187
|
+
responseMetadata = pivot_metadata or {}
|
|
187
188
|
# Set rows and fields from first query result (the pivot query)
|
|
188
189
|
if final_results.get("queryResults") and len(final_results["queryResults"]) >= 1:
|
|
189
190
|
query_results = final_results["queryResults"][0]
|
|
@@ -228,7 +229,7 @@ class Quill:
|
|
|
228
229
|
return {
|
|
229
230
|
'status': 'error',
|
|
230
231
|
'error': response.get('error'),
|
|
231
|
-
'data': response.get('metadata') or {},
|
|
232
|
+
'data': (response.get('metadata') or {}),
|
|
232
233
|
}
|
|
233
234
|
|
|
234
235
|
flag_query_results = self.run_queries(
|
|
@@ -237,7 +238,8 @@ class Quill:
|
|
|
237
238
|
)
|
|
238
239
|
|
|
239
240
|
tenant_flags = []
|
|
240
|
-
|
|
241
|
+
response_metadata = response.get('metadata') or {}
|
|
242
|
+
query_order = response_metadata.get('queryOrder') or []
|
|
241
243
|
query_results = (flag_query_results or {}).get('queryResults') or []
|
|
242
244
|
for tenant_field, query_result in zip(query_order, query_results):
|
|
243
245
|
rows = []
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
quillsql/__init__.py,sha256=FiuoxaNZveKXOPB0hkpfGNlpZKmSn3pRwcqm9HKYbCQ,180
|
|
2
|
-
quillsql/core.py,sha256=
|
|
2
|
+
quillsql/core.py,sha256=HMmRtQQj3bWuLTIE8YuZaj6cAwh4bSui3pFe9pA9SgQ,23261
|
|
3
3
|
quillsql/error.py,sha256=n9VKHw4FAgg7ZEAz2YQ8L_8FdRG_1shwGngf2iWhUSM,175
|
|
4
4
|
quillsql/assets/__init__.py,sha256=oXQ2ZS5XDXkXTYjADxNfGt55cIn_rqfgWL2EDqjTyoI,45
|
|
5
5
|
quillsql/assets/pgtypes.py,sha256=-B_2wUaoAsdX7_HnJhUlx4ptZQ6x-cXwuST9ACgGFdE,33820
|
|
@@ -14,7 +14,7 @@ quillsql/utils/pivot_template.py,sha256=NzHO7Ux8GVAKY-DUtsOmE7TUls2q6FJG2kgJxVWq
|
|
|
14
14
|
quillsql/utils/run_query_processes.py,sha256=FRmNvjTDLUBr7MqDKQmivdC0anwybMXUyzQbKnaZx70,698
|
|
15
15
|
quillsql/utils/schema_conversion.py,sha256=TFfMibN9nOsxNRhHw5YIFl3jGTvipG81bxX4LFDulUY,314
|
|
16
16
|
quillsql/utils/tenants.py,sha256=ZD2FuKz0gjBVSsThHDv1P8PU6EL8E009NWihE5hAH-Q,2022
|
|
17
|
-
quillsql-2.2.
|
|
18
|
-
quillsql-2.2.
|
|
19
|
-
quillsql-2.2.
|
|
20
|
-
quillsql-2.2.
|
|
17
|
+
quillsql-2.2.4.dist-info/METADATA,sha256=wEywCChkWsaEmZezh0DCkKUXHkgGLv0RR3OzCgEEWk0,1786
|
|
18
|
+
quillsql-2.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
quillsql-2.2.4.dist-info/top_level.txt,sha256=eU2vHnVqwpYQJ3ADl1Q-DIBzbYejZRUhcMdN_4zMCz8,9
|
|
20
|
+
quillsql-2.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|