##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
| /** | |
| * 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 |
| /* | |
| 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) |
| # 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 |
##Teradata TDCH and Parallel Transporter with MapR
##Environment Running on Peep.local: 192.168.1.26
###Tasks
| 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' |
| #!/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) |