Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client_secrets_moonshot-1349.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"installed":{"client_id":"619560615508-iqd84sctgen57skg1f9rq0cik47aeakr.apps.googleusercontent.com","project_id":"moonshot-1349","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"k7Ttnn19uSDrN9kn0U7iFhXc","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}
1 change: 1 addition & 0 deletions res/client_secrets_moonshot-1349.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"installed":{"client_id":"619560615508-iqd84sctgen57skg1f9rq0cik47aeakr.apps.googleusercontent.com","project_id":"moonshot-1349","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"k7Ttnn19uSDrN9kn0U7iFhXc","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}
Empty file.
Binary file not shown.
416 changes: 416 additions & 0 deletions res/part-00000

Large diffs are not rendered by default.

Binary file added res/part-00000.gzip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,30 @@ object SnowplowEnrichedEventSchema {
("dvce_screenheight", "INTEGER"),
("doc_charset", "STRING"),
("doc_width", "INTEGER"),
("doc_height", "INTEGER")
("doc_height", "INTEGER"),
("tr_currency", "STRING"),
("tr_total_base", "FLOAT"),
("tr_tax_base", "FLOAT"),
("tr_shipping_base", "FLOAT"),
("ti_currency", "STRING"),
("ti_price_base", "FLOAT"),
("base_currency", "STRING"),
("geo_timezone", "STRING"),
("mkt_clickid", "STRING"),
("mkt_network", "STRING"),
("etl_tags", "STRING"),
("dvce_sent_tstamp", "TIMESTAMP"),
("refr_domain_useri","STRING"),
("refr_dvce_tstamp", "TIMESTAMP"),
("derived_contexts", "STRING"),
("domain_sessionid", "STRING"),
("derived_tstamp", "TIMESTAMP"),
("event_vendor", "STRING"),
("event_name", "STRING"),
("event_format", "STRING"),
("event_version", "STRING"),
("event_fingerprint", "STRING"),
("true_tstamp", "TIMESTAMP")
)

def names: Array[String] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ object BigqueryLoaderCli {
//starts authorization process
val bigqueryInterface = new BigqueryInterface(projectId.value.get)

if (createTable.value.get) createDatasetAndTable(projectId.value.get, datasetId.value.get, tableId.value.get, bigqueryInterface)
println(createTable.hasValue)
if (createTable.value != "None" && createTable.value.get) createDatasetAndTable(projectId.value.get, datasetId.value.get, tableId.value.get, bigqueryInterface)

uploadData(projectId.value.get, datasetId.value.get, tableId.value.get, tsvFileLocation.value.get, bigqueryInterface)

}
catch{
case e: ArgotUsageException => println(e.message)
println()
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ object TsvParser {
// TODO: switch from throwing error to using scalaz Validation, maybe.
def getValues(line: String): List[String] = {
val values = line.split("\t", -1).toList
if (values.length != 108){
// println(" length " , values.length)
if (values.length != 131){
throw new Error("There seems to have been a parsing error")
}
values
Expand Down
2 changes: 1 addition & 1 deletion vagrant/peru.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ imports:
curl module ansible:
# Equivalent of git cloning tags/v1.6.6 but much, much faster
url: https://codeload.github.com/ansible/ansible/zip/69d85c22c7475ccf8169b6ec9dee3ee28c92a314
build: unzip ansible-69d85c22c7475ccf8169b6ec9dee3ee28c92a314.zip
unpack: zip
export: ansible-69d85c22c7475ccf8169b6ec9dee3ee28c92a314

git module ansible_playbooks:
Expand Down