diff --git a/notebooks/06_load_excel_files/06_load_excel_files.ipynb b/notebooks/06_load_excel_files/06_load_excel_files.ipynb index 974746d..997241b 100644 --- a/notebooks/06_load_excel_files/06_load_excel_files.ipynb +++ b/notebooks/06_load_excel_files/06_load_excel_files.ipynb @@ -3,6 +3,14 @@ "kernelspec": { "display_name": "Streamlit Notebook", "name": "streamlit" + }, + "lastEditStatus": { + "notebookId": "aw7ui7txrzv37izzzmdx", + "authorId": "2048419569569", + "authorName": "PRIYAV139", + "authorEmail": "veerabomma.s@northeastern.edu", + "sessionId": "6a8b14f3-5b36-44d1-a7bb-63e26e1a9034", + "lastEditTime": 1740519466028 } }, "nbformat_minor": 5, @@ -107,10 +115,11 @@ "id": "a878dd75-f426-427f-bbef-e5401097d9d6", "metadata": { "language": "sql", - "name": "sql_debugging" + "name": "sql_debugging", + "collapsed": false }, "outputs": [], - "source": "--DESCRIBE TABLE LOCATION;\n--SELECT * FROM LOCATION;\n--SHOW TABLES;", + "source": "--DESCRIBE TABLE LOCATION;\n--SELECT * FROM LOCATION;\nSHOW TABLES;", "execution_count": null } ] diff --git a/notebooks/07_load_daily_city_metrics/07_load_daily_city_metrics.ipynb b/notebooks/07_load_daily_city_metrics/07_load_daily_city_metrics.ipynb index e7dba9e..65b0b86 100644 --- a/notebooks/07_load_daily_city_metrics/07_load_daily_city_metrics.ipynb +++ b/notebooks/07_load_daily_city_metrics/07_load_daily_city_metrics.ipynb @@ -3,6 +3,14 @@ "kernelspec": { "display_name": "Streamlit Notebook", "name": "streamlit" + }, + "lastEditStatus": { + "notebookId": "zlu5xecfwt2gj2ud6x6k", + "authorId": "2048419569569", + "authorName": "PRIYAV139", + "authorEmail": "veerabomma.s@northeastern.edu", + "sessionId": "55f17f5e-6ae4-4502-9e61-abb5fda04bcf", + "lastEditTime": 1740519478247 } }, "nbformat_minor": 5, @@ -54,7 +62,8 @@ "id": "f9b7500f-5c4f-4c87-a14f-542427705e07", "metadata": { "language": "python", - "name": "py_table_exists" + "name": "py_table_exists", + "collapsed": false }, "outputs": [], "source": "def table_exists(session, database_name='', schema_name='', table_name=''):\n root = Root(session)\n tables = root.databases[database_name].schemas[schema_name].tables.iter(like=table_name)\n for table_obj in tables:\n if table_obj.name == table_name:\n return True\n\n return False\n\n# Not used, SQL alternative to Python version above\ndef table_exists2(session, database_name='', schema_name='', table_name=''):\n exists = session.sql(\"SELECT EXISTS (SELECT * FROM {}.INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '{}' AND TABLE_NAME = '{}') AS TABLE_EXISTS\".format(database_name, schema_name, table_name)).collect()[0]['TABLE_EXISTS']\n return exists", @@ -100,7 +109,7 @@ "collapsed": false }, "outputs": [], - "source": "--SELECT * FROM DAILY_CITY_METRICS LIMIT 10;", + "source": "SELECT * FROM DAILY_CITY_METRICS LIMIT 10;", "execution_count": null } ]