Database Reference
In-Depth Information
login_required
from google.appengine.api import memcache
from google.appengine.api import app_identity
from google.appengine.api import background_thread
import webapp2
import httplib2
from oauth2client.appengine import
AppAssertionCredentials
from apiclient.discovery import build
from mapreduce.mapper_pipeline import MapperPipeline
from job_runner import JobRunner
from config import PROJECT_ID
from config import GCS_BUCKET
credentials = AppAssertionCredentials(
scope='https://www.googleapis.com/auth/bigquery')
bigquery = build('bigquery', 'v2',
http=credentials.authorize(httplib2.Http(memcache)))
g_state_lock = threading.RLock()
ZERO_STATE = {
'status': 'IDLE',
'extract_job_id': '',
'extract_result': '',
'load_job_id': '',
'load_result': '',
'mapper_link': '',
'error': 'None',
'refresh': '',
}
g_state = ZERO_STATE.copy()
def pre(s):
'''Helper function to format JSON for display.'''
return '<pre>' + cgi.escape(str(s)) + '</pre>'
def run_bigquery_job(job_id_prefix, job_type, config):
Search WWH ::




Custom Search