Skip to content

Instantly share code, notes, and snippets.

@datadu-de
datadu-de / ODX-Mapping-Views-DDL-trigger.sql
Last active August 24, 2023 16:10
Create Mapping Views on ODX SQL Storage DDL trigger example
--CREATE MAPPING VIEWS ON ODX SQL STORAGE DDL TRIGGER
USE [ODX SQL]
GO
CREATE OR ALTER TRIGGER [ODX_CREATE_MAPPING_VIEWS] ON DATABASE
FOR CREATE_TABLE
, DROP_TABLE AS
$TriggerJobsInOrder = "ODX Transfer AW2019"
$PollInterval = 2500
$ApiKey = $Env:TxApiKey
$OcpApimSubscriptionKey = $Env:TxOcpApimSubscriptionKey
$BaseUrl = $Env:TxBaseUrl
$headers = New-Object "System.Collections.Generic.Dictionary[[String], [String]]"
$headers.Add("ApiKey", $ApiKey)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def isValid(s: str) -> bool:
openingChars = "([{"
closingChars = ")]}"
currBrackets = ""
for c in s:
if c in openingChars:
currBrackets += c
elif (
@datadu-de
datadu-de / part1.sql
Last active October 31, 2021 09:13
part1.sql
WITH c AS (
-- find overlaps
SELECT
s1.space_id,
s1.user_id,
s2.entry_time,
s2.leave_time
FROM
a s1,
a s2