##Teradata TDCH and Parallel Transporter with MapR
##Environment Running on Peep.local: 192.168.1.26
###Tasks
- Load sample data into Teradata database
- Run queries to ensure it's in there
- Move data using TDCH
- Move data using TD Parallel transporter
#!/bin/bash | |
# https://gist.github.com/robwierzbowski/5430952/ | |
# Create and push to a new github repo from the command line. | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Gather constant vars | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |
select ObjectColumnName from dbc.dbqlobjtbl a | |
join dbc.dbqlogtbl b on a.ProcID = b.ProcID | |
and a.QueryID = b.QueryID | |
where ObjectDatabaseName = 'database_name' and ObjectTableName = 'table_name' and statementtype = 'Select' and ObjectType = 'Col' |
##Teradata TDCH and Parallel Transporter with MapR
##Environment Running on Peep.local: 192.168.1.26
###Tasks
# You are going to need to use jruby and install the jdbc-teradata gem | |
# Create a file named database.yml and fill it out. It will look something like this: | |
# production: | |
# adapter: jdbc | |
# driver: com.teradata.jdbc.TeraDriver | |
# url: jdbc:teradata://localhost/DATABASE=ods,DBS_PORT=1025,COP=OFF | |
# username: your_username | |
# password: your_password |
/* | |
On Oracle 8i+, SQL Server 2005+, PostgreSQL 8.4+, DB2, Firebird 2.1+, Teradata, Sybase, Vertica: | |
*/ | |
WITH summary AS ( | |
SELECT p.id, | |
p.customer, | |
p.total, | |
ROW_NUMBER() OVER(PARTITION BY p.customer | |
ORDER BY p.total DESC) AS rk | |
FROM PURCHASES p) |
/** | |
* Convert Excel file to Sheets | |
* @param {Blob} excelFile The Excel file blob data; Required | |
* @param {String} filename File name on uploading drive; Required | |
* @param {Array} arrParents Array of folder ids to put converted file in; Optional, will default to Drive root folder | |
* @return {Spreadsheet} Converted Google Spreadsheet instance | |
**/ | |
function convertExcel2Sheets(excelFile, filename, arrParents) { | |
var parents = arrParents || []; // check if optional arrParents argument was provided, default to empty array if not |
// Module dependencies | |
var express = require('express'), | |
mysql = require('mysql'); | |
// Application initialization | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'root', |
""" | |
VCF.py | |
Kamil Slowikowski | |
October 30, 2013 | |
Read VCF files. Works with gzip compressed files and pandas. | |
Note: This module ignores the genotype columns because | |
I didn't need them at the time of writing. |
#!/usr/bin/perl | |
# Create index.html with a list of all files. | |
# Written by Ilya Zverev, licensed WTFPL. | |
use strict; | |
use POSIX qw(strftime); | |
use HTML::Template; | |
use File::Basename; | |
use Getopt::Long; |
/** | |
* Google Apps Script - List all files & folders in a Google Drive folder, & write into a speadsheet. | |
* - Main function 1: List all folders | |
* - Main function 2: List all files & folders | |
* | |
* Hint: Set your folder ID first! You may copy the folder ID from the browser's address field. | |
* The folder ID is everything after the 'folders/' portion of the URL. | |
* | |
* @version 1.0 | |
* @see https://github.com/mesgarpour |