A CLI app which use programmatic access to the database sql server.
-
git clone https://github.com/bngom/data-wrangling-with-python-and-sql -
cd data-wrangling-with-python-and-sql -
py -m venv envCreate a virtual environment -
.\env\Scripts\activateActivate the virtual environment -
pip install .Install the setup for the command line interface -
pysql-cli --helpTo check the usage of the CLI. Will also install requirements. -
pysql-cli generate-last-survey-structureCreate a filelastsurveystructure.csvin db folder -
pysql-cli get-last-survey-structureGet the last known survey structure -
pysql-cli get-view-surveydataCheck if the view vw_AllSurveyData exists -
pysql-cli update-survey-structure "YOUR QUERY"Trigger the view creation (on INSERT, UPDATE or DELETE on SurveyStructure table)- example
pysql-cli update-survey-structure "DELETE FROM SurveyStructure WHERE SurveyId = 2 AND QuestionId = 3"
- example
-
pysql-cli get-view-surveydataReturns data from vw_AllSurveyData