Skip to content

Instantly share code, notes, and snippets.

View dchimeno's full-sized avatar

Daniel Chimeno Santiago dchimeno

View GitHub Profile
#!/usr/bin/env bash
QUERIES_FILE="bench_queries-uk.sql"
TABLE=$1
TRIES=3
cat "$QUERIES_FILE" | sed "s/{table}/${TABLE}/g" | while read query; do
if [ $query != "--*" ]
then
#!/usr/bin/env bash
QUERIES_FILE="bench_queries-uk.sql"
TABLE=$1
TRIES=3
cat "$QUERIES_FILE" | sed "s/{table}/${TABLE}/g" | while read query; do
if [$query != "--*" ]
then
We can't make this file beautiful and searchable because it's too large.
l3_code,country_code,n1_code,n2_code,n3_code,l1_code,l2_code,l_factor,population,l1_name,l2_name,l3_name,n1_name,n2_name,n3_name,workpopulation
1500101001,ES,ES1,ES11,ES111,15001,1500101,1,896,abegondo,1500101,1500101001,noroeste,galicia,a coruña,135
1500101002,ES,ES1,ES11,ES111,15001,1500101,1,730,abegondo,1500101,1500101002,noroeste,galicia,a coruña,246
1500102001,ES,ES1,ES11,ES111,15001,1500102,1,708,abegondo,1500102,1500102001,noroeste,galicia,a coruña,0
1500102002,ES,ES1,ES11,ES111,15001,1500102,1,697,abegondo,1500102,1500102002,noroeste,galicia,a coruña,141
1500103001,ES,ES1,ES11,ES111,15001,1500103,1,1481,abegondo,1500103,1500103001,noroeste,galicia,a coruña,112
1500103002,ES,ES1,ES11,ES111,15001,1500103,1,942,abegondo,1500103,1500103002,noroeste,galicia,a coruña,170
1500201001,ES,ES1,ES11,ES111,15002,1500201,1,809,ames,1500201,1500201001,noroeste,galicia,a coruña,66
1500201003,ES,ES1,ES11,ES111,15002,1500201,1,894,ames,1500201,1500201003,noroeste,galicia,a coruña,2
1500202001,ES,ES1,ES11,ES111,15002,1
We can't make this file beautiful and searchable because it's too large.
"country_code","n1_code","n2_code","n3_code","l1_code","l2_code","l3_code","l_factor","population","l1_name","l2_name","l3_name","n1_name","n2_name","n3_name","workpopulation"
"ES","ES1","ES11","ES111","15001","1500101","1500101001","1","896","abegondo","1500101","1500101001","noroeste","galicia","a coruña","135"
"ES","ES1","ES11","ES111","15001","1500101","1500101002","1","730","abegondo","1500101","1500101002","noroeste","galicia","a coruña","246"
"ES","ES1","ES11","ES111","15001","1500102","1500102001","1","708","abegondo","1500102","1500102001","noroeste","galicia","a coruña","0"
"ES","ES1","ES11","ES111","15001","1500102","1500102002","1","697","abegondo","1500102","1500102002","noroeste","galicia","a coruña","141"
"ES","ES1","ES11","ES111","15001","1500103","1500103001","1","1481","abegondo","1500103","1500103001","noroeste","galicia","a coruña","112"
"ES","ES1","ES11","ES111","15001","1500103","1500103002","1","942","abegondo","1500103","1500103002","noroeste","galicia","a coruña","170"
"ES","ES1","ES1
We can't make this file beautiful and searchable because it's too large.
country_code,n1_code,n2_code,n3_code,l1_code,l2_code,l3_code,l_factor,population,l1_name,l2_name,l3_name,n1_name,n2_name,n3_name,workpopulation
ES,ES1,ES11,ES111,15001,1500101,1500101001,1,896,abegondo,1500101,1500101001,noroeste,galicia,a coruña,135
ES,ES1,ES11,ES111,15001,1500101,1500101002,1,730,abegondo,1500101,1500101002,noroeste,galicia,a coruña,246
ES,ES1,ES11,ES111,15001,1500102,1500102001,1,708,abegondo,1500102,1500102001,noroeste,galicia,a coruña,0
ES,ES1,ES11,ES111,15001,1500102,1500102002,1,697,abegondo,1500102,1500102002,noroeste,galicia,a coruña,141
ES,ES1,ES11,ES111,15001,1500103,1500103001,1,1481,abegondo,1500103,1500103001,noroeste,galicia,a coruña,112
ES,ES1,ES11,ES111,15001,1500103,1500103002,1,942,abegondo,1500103,1500103002,noroeste,galicia,a coruña,170
ES,ES1,ES11,ES111,15002,1500201,1500201001,1,809,ames,1500201,1500201001,noroeste,galicia,a coruña,66
ES,ES1,ES11,ES111,15002,1500201,1500201003,1,894,ames,1500201,1500201003,noroeste,galicia,a coruña,2
ES,ES1,ES11,ES111,15002,1500202,1500
We can't make this file beautiful and searchable because it's too large.
country_code|n1_code|n2_code|n3_code|l1_code|l2_code|l3_code|l_factor|population|l1_name|l2_name|l3_name|n1_name|n2_name|n3_name|workpopulation
ES|ES1|ES11|ES111|15001|1500101|1500101001|1|896|abegondo|1500101|1500101001|noroeste|galicia|a coruña|135
ES|ES1|ES11|ES111|15001|1500101|1500101002|1|730|abegondo|1500101|1500101002|noroeste|galicia|a coruña|246
ES|ES1|ES11|ES111|15001|1500102|1500102001|1|708|abegondo|1500102|1500102001|noroeste|galicia|a coruña|0
ES|ES1|ES11|ES111|15001|1500102|1500102002|1|697|abegondo|1500102|1500102002|noroeste|galicia|a coruña|141
ES|ES1|ES11|ES111|15001|1500103|1500103001|1|1481|abegondo|1500103|1500103001|noroeste|galicia|a coruña|112
ES|ES1|ES11|ES111|15001|1500103|1500103002|1|942|abegondo|1500103|1500103002|noroeste|galicia|a coruña|170
ES|ES1|ES11|ES111|15002|1500201|1500201001|1|809|ames|1500201|1500201001|noroeste|galicia|a coruña|66
ES|ES1|ES11|ES111|15002|1500201|1500201003|1|894|ames|1500201|1500201003|noroeste|galicia|a coruña|2
ES|ES1|ES11|ES111|15002|1500202|1500