best_practice_analyzer
This is currently just a POC. Handle all BPA related items.
You can call the BPA()
class to download or specify your own BPA file.
It is used with tabular_editor.py to run BPA.
I did not want to re-invent the wheel, so just letting TE2 work it's magic.
BPA
Setting BPA Class for future work...
Source code in pytabular/best_practice_analyzer.py
__init__(file_path='Default', verify_download=True)
BPA class to be used with the TE2 class.
You can create the BPA class without any arguments. This doesn't do much right now... BPA().location is where the file path is stored.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path |
str
|
See |
'Default'
|
verify_download |
bool
|
Passthrough argument for |
True
|
Source code in pytabular/best_practice_analyzer.py
download_bpa_file(download_location='https://raw.githubusercontent.com/microsoft/Analysis-Services/master/BestPracticeRules/BPARules.json', folder='Best_Practice_Analyzer', auto_remove=True, verify=False)
Download a BPA file from local or web.
Runs a request.get() to retrieve the json file from web. Will return and store in directory. Will also register the removal of the new directory and file when exiting program.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
download_location |
str
|
Defaults to [BPA]'https://raw.githubusercontent.com/microsoft/Analysis-Services/master/BestPracticeRules/BPARules.json'. |
'https://raw.githubusercontent.com/microsoft/Analysis-Services/master/BestPracticeRules/BPARules.json'
|
folder |
str
|
New folder string. Defaults to 'Best_Practice_Analyzer'. |
'Best_Practice_Analyzer'
|
auto_remove |
bool
|
Auto Remove when script exits. Defaults to True. |
True
|
verify |
bool
|
Passthrough argument for |
False
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
File path for the newly downloaded BPA. |