Skip to content

Instantly share code, notes, and snippets.

View ataurrahim's full-sized avatar

Ataur Rahim Chowdhury ataurrahim

View GitHub Profile
@ataurrahim
ataurrahim / README.md
Created December 8, 2020 05:03 — forked from brunogaspar/README.md
Install wkhtmltopdf on Ubuntu (14.04 64-bit) or (16.04 64-bit)

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Installation

Import a MySQL Table or Database to a BigQuery Schema.

Usage:

~/bin/mysql_table_to_big_query.sh bucket_name schema_name table_name

~/bin/mysql_schema_to_big_query.sh bucket_name \[schema_name\].
@ataurrahim
ataurrahim / mysql_to_big_query.sh
Created April 4, 2020 09:14 — forked from shantanuo/mysql_to_big_query.sh
Copy MySQL table to big query. If you need to copy all tables, use the loop given at the end. Exit with error code 3 if blob or text columns are found. The csv files are first copied to google cloud before being imported to big query.
#!/bin/sh
TABLE_SCHEMA=$1
TABLE_NAME=$2
mytime=`date '+%y%m%d%H%M'`
hostname=`hostname | tr 'A-Z' 'a-z'`
file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA"
bucket_name=$file_prefix
splitat="4000000000"
bulkfiles=200
### Keybase proof
I hereby claim:
* I am ataurrahim on github.
* I am ataurrc (https://keybase.io/ataurrc) on keybase.
* I have a public key ASAsqUF3sNyJDXwr9Ulm1gyuto8kuW3qYdd5ROGJ944zbAo
To claim this, I am signing this object: