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.
276 lines
10 KiB
Python
276 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
|
return r
|
||
5 years ago
|
print (SYS_ARGS.keys())
|
||
|
print ("has basic ",has_basic)
|
||
|
print ("has action ",has_action)
|
||
|
# pseudonym.apply(table='person',dataset='wgan_original',key='./curation-test-2.json')
|
||
|
# args = {"dataset":"wgan_original","table":"observation","key":"./curation-test-2.json"}
|
||
|
# builder = Builder()
|
||
|
# # builder.encode(dataset='wgan_original',table='person',key='./curation-test-2.json')
|
||
|
# builder.process(**args)
|