This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH table_join AS ( | |
SELECT row, value, field_id FROM cucm_csv_batentity | |
WHERE batdata_id = 10 AND role = 'phone' AND ((field_id = 2 AND value = 'Cisco 6921') OR (field_id = 1))), | |
add_table_join AS ( | |
SELECT row, value, field_id from cucm_csv_batadditional | |
WHERE batdata_id = 10 AND role = 'phone' AND ((field_id = 2 AND value != '') OR (field_id = 1 AND value != ''))), | |
add_sort_join AS ( | |
SELECT a0.row, "Import Notes", "Import Date" FROM | |
(SELECT DISTINCT add_table_join.row, add_table_join.value as "Import Notes" FROM add_table_join WHERE add_table_join.field_id = 2) AS a0 INNER JOIN | |
(SELECT DISTINCT add_table_join.row, add_table_join.value as "Import Date" FROM add_table_join WHERE add_table_join.field_id = 1) AS a1 ON a0.row = a1.row), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH table_join AS ( | |
SELECT rowdex, "value", field_id FROM cucm_csv_batrepeatingfield | |
WHERE batdata_id = 10 AND role = 'phone' AND | |
((field_id = 327 AND value ILIKE '%US%') OR | |
(field_id = 295 AND value ILIKE '%10000%') OR | |
(field_id = 220 AND value ILIKE '%Cu1%'))), | |
sort_join AS ( | |
SELECT s0.rowdex, "Directory Number", "Route Partition" FROM | |
(SELECT DISTINCT table_join.rowdex, table_join.value as "Directory Number" FROM table_join WHERE table_join.field_id = 295) AS s0 FULL OUTER JOIN | |
(SELECT DISTINCT table_join.rowdex, table_join.value as "Route Partition" FROM table_join WHERE table_join.field_id = 220) AS s1 ON s0.rowdex = s1.rowdex) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l = [1, 2, 3, 4, 6, 7, 8, 10, 12] | |
ranges, last = [], None | |
for i in l: | |
if last is None or i - last > 1: | |
ranges.append([i, i]) | |
else: | |
ranges[-1][1] = i | |
last = i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def import_regular_records( | |
self, role: VOSSRole, direction: Optional[str]): | |
"""Using list API, imports records for a non-relation role. | |
:param role: Selected role to import records for. | |
:param direction: Hierarchy traversal direction or `None` if the | |
default traversal behaviour is required. | |
""" | |
if direction == 'default': | |
direction = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE VIEW "joined_batches_fieldmapperview_290" AS | |
SELECT T1_1.id AS id, | |
T1_1.added AS added, | |
T1_1.updated AS updated, | |
T1_1.notes AS notes, | |
T1_1.uid AS uid, | |
T1_1.relates_to_id AS relates_to_id, | |
T1_1.role_id AS role_id, | |
T1_1.row AS row, | |
T1_1.fields || coalesce(T1_2.fields, '{}'::JSONB) || coalesce(T1_3.fields, '{}'::JSONB) AS fields |
OlderNewer