You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
278 lines
10 KiB
Python
278 lines
10 KiB
Python
5 years ago
|
"""
|
||
|
Create pseudonyms map as follows :
|
||
|
table, field,value,enc,filter
|
||
|
"""
|
||
|
import pandas as pd
|
||
|
import numpy as np
|
||
|
from google.oauth2 import service_account
|
||
|
from google.cloud import bigquery as bq
|
||
|
import json
|
||
|
import threading
|
||
|
import sys
|
||
|
import os
|
||
|
import itertools
|
||
|
|
||
|
DATASET_SUFFIX = '_pseudo'
|
||
|
PSEUDO_TABLENAME = 'map'
|
||
|
|
||
|
SYS_ARGS = {'context':''}
|
||
|
if len(sys.argv) > 1:
|
||
|
|
||
|
N = len(sys.argv)
|
||
|
for i in range(1,N):
|
||
|
value = None
|
||
|
if sys.argv[i].startswith('--'):
|
||
|
key = sys.argv[i].replace('-','')
|
||
5 years ago
|
# if 'filter' in args :
|
||
5 years ago
|
else:
|
||
5 years ago
|
# FILTER = FILTER.replace(field,'values')
|
||
5 years ago
|
if value not in values :
|
||
5 years ago
|
"""
|
||
5 years ago
|
f = open(FILENAME.replace('.csv','.sql'),'w+')
|