MCPcopy Create free account

hub / github.com/SohierDane/BigQuery_Helper / functions

Functions22 in github.com/SohierDane/BigQuery_Helper

↓ 4 callersMethodquery_to_pandas
Execute a SQL query & return a pandas dataframe
bq_helper.py:129
↓ 2 callersMethod__fetch_dataset
Lazy loading of dataset. For example, if the user only calls `self.query_to_pandas` then the dataset never has to be fetched.
bq_helper.py:33
↓ 2 callersMethod__fetch_table
Lazy loading of table
bq_helper.py:42
↓ 2 callersMethodestimate_query_size
Estimate gigabytes scanned by query. Does not consider if there is a cached query table. See https://cloud.google.com/bigquer
bq_helper.py:118
↓ 2 callersMethodquery_to_pandas_safe
Execute a query, but only if the query would scan less than `max_gb_scanned` of data.
bq_helper.py:148
↓ 2 callersMethodtable_schema
Get the schema for a specific table from a dataset. Unrolls nested field names into the format that can be copied directly in
bq_helper.py:92
↓ 1 callersMethod__handle_record_field
Unpack a single row, including any nested fields.
bq_helper.py:52
↓ 1 callersMethod__unpack_all_schema_fields
Unrolls nested schemas. Returns dataframe with one row per field, and the field names in the format accepted by the API. Resu
bq_helper.py:72
↓ 1 callersMethodhead
Get the first n rows of a table as a DataFrame. Does not perform a full table scan; should use a trivial amount of data as long as n
bq_helper.py:158
↓ 1 callersMethodlist_tables
List the names of the tables in a dataset
bq_helper.py:111
Method__init__
(self, active_project, dataset_name, max_wait_seconds=180)
bq_helper.py:21
MethodsetUp
(self)
test_helper.py:29
Methodtest_bad_query_raises_right_error
(self)
test_helper.py:65
Methodtest_estimate_query_size
(self)
test_helper.py:43
Methodtest_head
(self)
test_helper.py:58
Methodtest_list_nested_schema
(self)
test_helper.py:69
Methodtest_list_schema
(self)
test_helper.py:40
Methodtest_list_tables
(self)
test_helper.py:37
Methodtest_query_safe_fails
(self)
test_helper.py:52
Methodtest_query_safe_passes
(self)
test_helper.py:49
Methodtest_query_to_pandas
(self)
test_helper.py:46
Methodtest_useage_tracker
(self)
test_helper.py:61