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
SELECT sys.objects.object_id, | |
sys.schemas.NAME AS [Schema], | |
sys.objects.NAME AS Object_Name, | |
sys.objects.type_desc AS [Type] | |
FROM sys.sql_modules(NOLOCK) | |
INNER JOIN sys.objects(NOLOCK) ON sys.sql_modules.object_id = sys.objects.object_id | |
INNER JOIN sys.schemas(NOLOCK) ON sys.objects.schema_id = sys.schemas.schema_id | |
WHERE sys.sql_modules.DEFINITION COLLATE SQL_Latin1_General_CP1_CI_AS LIKE '%.PartyTitleTxt%' ESCAPE '\' | |
ORDER BY sys.objects.type_desc, | |
sys.schemas.NAME, |
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
-- will contain data about the data flow source monitor tables | |
DECLARE @tableInfo TABLE ( | |
table_id INT identity(1, 1), -- a unique identifier we will use to loop over the tables | |
table_name NVARCHAR(max) -- the name of the table in question, used to build the dynamic query while in the loop | |
) | |
-- popuplate the table with the names of tables used to store source monitor info for the data flows | |
INSERT @tableInfo | |
SELECT table_name | |
FROM INFORMATION_SCHEMA.TABLES |
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
BEGIN TRY | |
-- removing IDENTITY specification from master table. Premaster table will have IDENTITY specification, and the ID will carry forward to the master table | |
BEGIN TRANSACTION REMOVE_IDENTITY_SPEC | |
CREATE TABLE [dbo].[MstrInvAssetPartyRoleRel_withoutIdentitySpecification] ( | |
[InvAssetPartyIDNum] [int] NOT NULL, | |
[InvAstIdNum] [int] NOT NULL, | |
[PartyRoleRelIDNum] [int] NOT NULL, | |
[CADIS_SYSTEM_INSERTED] [datetime] NULL, | |
[CADIS_SYSTEM_UPDATED] [datetime] NULL, |
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
param ( | |
[string]$output = "wiki", # can be html or wiki | |
[string]$DatabaseServer = "nt7565", | |
[string]$Database = "MARKITEDM_DEV_DX" | |
#[Parameter(Mandatory=$true)][string]$username, | |
#[string]$password = $( Read-Host "Input password, please" ) | |
) | |
Clear-Host | |
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex |
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
# comes with node and npm already installed | |
FROM node:carbon-alpine | |
RUN mkdir -p /usr/src/app | |
RUN chown node:node /usr/src/app | |
WORKDIR /usr/src/app | |
USER node | |
# ensures both package.json and package-lock.json are copied | |
COPY package*.json ./ | |
RUN npm install --quiet --production --no-progress && \ |
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 A AS ( | |
SELECT * | |
FROM OPENROWSET('SQLNCLI', 'Server=<SERVERA>;Database=CADIS;Trusted_Connection=yes;', 'select top 10 * from <TABLE>') | |
), | |
B AS (SELECT * FROM <TABLE>), | |
A_ONLY AS ( | |
SELECT TOP 10 * FROM A | |
EXCEPT | |
SELECT TOP 10 * FROM B |
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
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%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
import argparse | |
import os | |
import boto3 | |
class S3MultipartUpload(object): | |
# AWS throws EntityTooSmall error for parts smaller than 5 MB | |
PART_MINIMUM = int(5e6) |
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
"""Run this script to create or refresh your developer environment | |
Installs a virtual environment with the main requirements at venv, one at venv/dbt, and one at venv/meltano. The root (venv) can be changed by passing an argument e.g. "python requirements/developer_setup.py my_venv_root" | |
To run: python developer_setup.py | |
""" | |
import glob | |
import os | |
import pip | |
import re | |
import shutil | |
import subprocess |
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
import base64 | |
import json | |
import multiprocessing | |
import sys | |
import boto3 | |
import botocore | |
INPUT_FILE = 'all_raw_files.txt' | |
S3_RAW_BUCKET_NAME = '____' |