<jupyter_start><jupyter_text>Basic table auditorMost of these checks can be applied to most simple MLab tables and views.This notbook is used for prototyping.  The release version is in  ../scripts/inspectTable.py<jupyter_code>import re
import pandas as pd
import BQhelper as bq
import inspectTable

bq.project = "mlab-sandbox"

# Tests, designed to be repeated
UnitTest=False
if UnitTest:
    inspectTable.UnitTestAll()

if UnitTest:
    inspectTable.inventoryTable('measurement-lab.ndt.ndt5')
if False:
    inspectTable.inspectDataSetMappings('mlab-oti.base_tables')
    inspectTable.inspectDataSetMappings('measurement-lab.ndt')
    inspectTable.inspectDataSetMappings('measurement-lab.library')
if True:
    ret=bq.getTables('mlab-oti.base_tables')
    print (ret)
#    inspectTable.inventoryTable('mlab-oti.base_tables.ndt')
    
    
STOP
# Expensive, but what we came for
# inspectTable.inventoryDataSet('measurement-lab.ndt')

# Expensive, but what we came for
# inspectTable.inventoryDataSet('measurement-lab.library')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0946073793755913, 'fraction_numerical': 0.000946073793755913, 'mean_word_length': 5.2976190476190474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '613765', 'license': 'Apache-2.0', 'n_tokens_mistral': 344, 'n_tokens_neox': 344, 'n_words': 78, 'path': 'inspector/plottools/Prototype table auditor.ipynb', 'repo_name': 'm-lab/analysis', 'size': '1057'}