thinkingmachines / bqup Goto Github PK
View Code? Open in Web Editor NEW(pronounced BACK-wup) BigQuery backup scripts
Home Page: https://pypi.org/project/bqup/
License: MIT License
(pronounced BACK-wup) BigQuery backup scripts
Home Page: https://pypi.org/project/bqup/
License: MIT License
Change view files to .SQL format for syntax highlighting in github. Mainly for code review purposes
If i'm not mistaken, it's just a matter of adding sort_keys=True
to the json.dumps
call.
Behavior confirmed in the ff. environment as per @profwacko :
Python 3.5.3
bqup==0.0.6
ValueError
is raised there is a BQ MODEL
type in the BQ project. This occurs in projects with BQ ML models e.g. psc-demand
.
sample stacktrace:
Traceback (most recent call last):
File "/home/psc-bqup/.local/bin/bqup", line 11, in <module>
load_entry_point('bqup', 'console_scripts', 'bqup')()
File "/home/psc-bqup/bqup/bqup/main.py", line 33, in main
p = Project(project_id or None, args['--schema'])
File "/home/psc-bqup/bqup/bqup/project.py", line 16, in __init__
map(partial(Dataset, self, export_schema), self.client.list_datasets()))
File "/home/psc-bqup/bqup/bqup/dataset.py", line 22, in __init__
map(partial(Table, self, export_schema), project.client.list_tables(bq_dataset.reference)))
File "/home/psc-bqup/bqup/bqup/table.py", line 30, in __init__
raise ValueError('Unrecognized table type: {}'.format(self.table_type))
ValueError: Unrecognized table type: MODEL
Minimize noise in README
https://www.makeareadme.com/
Running without the -x
flag should still create empty files for each table.
Ongoing work in the optimization
branch
First, figure out if this is even possible
Add 'CREATE OR REPLACE VIEW ' in view definition.
setup(
...
install_requires=[deps here],
)
ValueError: Unrecognized table type: MATERIALIZED_VIEW
What's the best way to set up a one-click deploy thing?
You can check geomancer's CODE_OF_CONDUCT and CONTRIBUTING
Traceback (most recent call last):
File "/Users/jessicatiu/miniconda3/bin/bqup", line 11, in <module>
load_entry_point('bqup', 'console_scripts', 'bqup')()
File "/Users/jessicatiu/bqup/bqup/main.py", line 33, in main
p = Project(project_id or None, args['--schema'])
File "/Users/jessicatiu/bqup/bqup/project.py", line 16, in __init__
map(partial(Dataset, self, export_schema), self.client.list_datasets()))
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 199, in _items_iter
for page in self._page_iter(increment=False):
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 230, in _page_iter
page = self._next_page()
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 349, in _next_page
response = self._get_next_page_response()
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 401, in _get_next_page_response
query_params=params)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/cloud/bigquery/client.py", line 311, in _call_api
return call()
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/api_core/retry.py", line 260, in retry_wrapped_func
on_error=on_error,
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/api_core/retry.py", line 177, in retry_target
return target()
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/cloud/_http.py", line 290, in api_request
headers=headers, target_object=_target_object)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/cloud/_http.py", line 183, in _make_request
return self._do_request(method, url, headers, data, target_object)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/cloud/_http.py", line 212, in _do_request
url=url, method=method, headers=headers, data=data)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/auth/transport/requests.py", line 198, in request
self._auth_request, method, url, request_headers)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/auth/credentials.py", line 122, in before_request
self.refresh(request)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/oauth2/credentials.py", line 136, in refresh
self._client_secret))
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/oauth2/_client.py", line 237, in refresh_grant
response_data = _token_endpoint_request(request, token_uri, body)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/oauth2/_client.py", line 111, in _token_endpoint_request
_handle_error_response(response_body)
File "/Users/jessicatiu/miniconda3/lib/python3.6/site-packages/google/oauth2/_client.py", line 61, in _handle_error_response
error_details, response_body)
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n "error" : "invalid_grant",\n "error_description" : "Bad Request"\n}')
Will need access to a mac ¯_(ツ)_/¯
The link to the bqup-starter in the readme looks to be broken.
Useful for integrating with Slack
Routine definition includes 'AS (' syntax so it cannot be run by bq query
bq query --use_legacy_sql=false < 'folder/proejct/dataset/name.procedure.sql'
i.e. adding an "updated at" timestamp in README.md
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.