From 6a46b829fdf6e851e2fb455fc643b2fe760f0855 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Mon, 16 Oct 2023 07:11:25 +1100 Subject: [PATCH] aws nb updates --- notebooks/aws/aws.ipynb | 10 +++------- scripts/entrypoint.sh | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/notebooks/aws/aws.ipynb b/notebooks/aws/aws.ipynb index c3e84db..37ad5f7 100644 --- a/notebooks/aws/aws.ipynb +++ b/notebooks/aws/aws.ipynb @@ -6,10 +6,7 @@ "metadata": {}, "outputs": [], "source": [ - "import sys\n", - "sys.path.append('/jupyter/ext')\n", - "import stackql\n", - "%load_ext stackql" + "%load_ext pystackql" ] }, { @@ -100,7 +97,7 @@ "source": [ "# get multiple regions asynchronously\n", "from pystackql import StackQL\n", - "stackql = StackQL()\n", + "stackql = StackQL(output='pandas')\n", "stackql.executeStmt(\"REGISTRY PULL aws\")" ] }, @@ -127,8 +124,7 @@ " for region in regions\n", "]\n", "\n", - "res = stackql.executeQueriesAsync(queries)\n", - "instances_df = pd.read_json(json.dumps(res))\n", + "instances_df = await stackql.executeQueriesAsync(queries)\n", "instances_df" ] } diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index e7346d9..0066a67 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/sh /srv/stackql/stackql --version echo "starting stackql server..." -nohup /srv/stackql/stackql --http.response.pageLimit=-1 --pgsrv.port=5444 srv & +nohup /srv/stackql/stackql --http.response.pageLimit=-1 --pgsrv.port=5466 srv & echo "stackql server started" start-notebook.sh --NotebookApp.token='' \ No newline at end of file