Instance | Branch |
---|
This file contains 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
""" | |
Use-case: automate clones in Databricks for dev testing similar to Snowflake's zero-copy clone. | |
This doesn't use the Catalog API as that may rely on cred passthrough | |
- https://docs.microsoft.com/en-us/azure/databricks/security/credential-passthrough/adls-passthrough | |
`py4j.security.Py4JSecurityException: method ... is not whitelisted on class org.apache.spark.sql.catalog.Table` | |
""" | |
prefixes = ["layer_a", "layer_b"] # prefix matching on schemas to copy over for layers |
This file contains 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
import adal, json, requests | |
clientid = "YOUR-APPLICATION-ID" | |
tenant_id = "YOUR-TENANT-ID" | |
resource = "https://manage.office.com" | |
private_key = open("YOUR-PRIVATE-KEY-FILENAME.pem", "r").read() | |
public_key_thumbprint = "YOUR-PUBLIC-KEY-THUMBPRINT" | |
#request access token | |
context = adal.AuthenticationContext('https://login.microsoftonline.com/{}'.format(tenant_id)) |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
#Import necessary libraries | |
import msal | |
import requests | |
import json | |
import pandas as pd | |
from datetime import date, timedelta |
This file contains 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
96 | |
97 | |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | |
104 |
This file contains 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
param( | |
2 | |
[Parameter(Mandatory=$True)] | |
3 | |
[string] | |
4 | |
$rootFolderPath, | |
5 | |
| |
6 |
This file contains 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
param( | |
[string] | |
$ParamFile = "common.parameters.txt", | |
[string] | |
$subscriptionId, | |
[string] | |
$certPassword, |
This file contains 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
#!/bin/sh | |
# Helper | |
safeRunCommand() { | |
typeset cmd="$*" | |
typeset ret_code | |
echo cmd=$cmd | |
eval $cmd | |
ret_code=$? |
This file contains 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
#!/bin/bash | |
# current Git branch | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# v1.0.0, v1.5.2, etc. | |
versionLabel=v$1 | |
# establish branch and tag name variables | |
devBranch=develop |
This file contains 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
# depends on justin808 gist named utility.zsh | |
# https://gist.github.com/justin808/bdef67f37c2cbdba898a | |
# See forum discussion: http://forum.railsonmaui.com/t/zsh-with-git-flow/135 | |
#### GIT #### | |
# http://superuser.com/questions/458906/zsh-tab-completion-of-git-commands-is-very-slow-how-can-i-turn-it-off | |
# fix slow completion on files | |
# __git_files () { | |
# _wanted files expl 'local files' _files |
NewerOlder