diff --git a/README.md b/README.md index 8650a78..2d3e4ab 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ UniverSQL relies on Snowflake and Polaris for access control and data catalog so [![Demo](https://s3.ezgif.com/tmp/ezgif-3-7afce8acdb.gif)](https://www.youtube.com/watch?v=s1fpSEE-pAc) +#### [Watch on YouTube](https://www.youtube.com/watch?v=s1fpSEE-pAc) + + # How it works? * Snowflake SQL API implementation to handle the Snowflake connections, acting as a proxy between DuckDB and Snowflake. diff --git a/testing.ipynb b/testing.ipynb index 079b0a7..5d7398b 100644 --- a/testing.ipynb +++ b/testing.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 68, + "execution_count": 23, "id": "initial_id", "metadata": { "ExecuteTime": { @@ -23,14 +23,17 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 24, "id": "a28646d5a8560160", "metadata": { "ExecuteTime": { "end_time": "2024-08-23T14:30:35.029029Z", "start_time": "2024-08-23T14:30:34.783445Z" }, - "collapsed": false + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } }, "outputs": [ { @@ -112,7 +115,7 @@ " \n", " \n", " 600000\n", - " 42540544\n", + " 42494464\n", " ACCOUNTADMIN\n", " ...\n", " ON\n", @@ -220,7 +223,7 @@ "\n", " bytes owner ... change_tracking is_external \\\n", "0 43210240 ACCOUNTADMIN ... ON N \n", - "1 42540544 ACCOUNTADMIN ... ON N \n", + "1 42494464 ACCOUNTADMIN ... ON N \n", "2 58829312 ACCOUNTADMIN ... ON N \n", "3 42525678592 ACCOUNTADMIN ... OFF N \n", "4 0 ACCOUNTADMIN ... OFF N \n", @@ -242,7 +245,7 @@ "[5 rows x 22 columns]" ] }, - "execution_count": 27, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -253,40 +256,17 @@ }, { "cell_type": "code", - "execution_count": 69, - "id": "ea7059a9dc949865", - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-08-25T02:20:47.093505Z", - "start_time": "2024-08-25T02:20:34.445351Z" - } - }, - "outputs": [ - { - "data": { - "text/plain": " C_MKTSEGMENT count\n0 AUTOMOBILE 119008\n1 BUILDING 120568\n2 FURNITURE 119872\n3 HOUSEHOLD 120756\n4 MACHINERY 119796", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
C_MKTSEGMENTcount
0AUTOMOBILE119008
1BUILDING120568
2FURNITURE119872
3HOUSEHOLD120756
4MACHINERY119796
\n
" - }, - "execution_count": 69, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.cursor().execute(\"\"\"SELECT \"TPCH_SF1\".\"DYNAMIC_ICEBERG_TABLE_CUSTOMER\".\"C_MKTSEGMENT\" AS \"C_MKTSEGMENT\", COUNT(*) AS \"count\" FROM \"MY_ICEBERG_JINJAT\".\"TPCH_SF1\".\"DYNAMIC_ICEBERG_TABLE_CUSTOMER\" GROUP BY \"TPCH_SF1\".\"DYNAMIC_ICEBERG_TABLE_CUSTOMER\".\"C_MKTSEGMENT\" ORDER BY \"TPCH_SF1\".\"DYNAMIC_ICEBERG_TABLE_CUSTOMER\".\"C_MKTSEGMENT\" ASC\"\"\").fetch_pandas_all()\n" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "b157465faf38b029", + "execution_count": 26, + "id": "d01f1e0b-d4b7-4b16-b1a8-adf73b874dde", "metadata": { "ExecuteTime": { - "end_time": "2024-08-23T02:34:57.320352Z", - "start_time": "2024-08-23T02:34:56.948628Z" + "end_time": "2024-08-23T14:34:49.413Z", + "start_time": "2024-08-23T14:34:49.012550Z" }, - "collapsed": false + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } }, "outputs": [ { @@ -317,28 +297,28 @@ " \n", " \n", " 0\n", - " AUTOMOBILE\n", - " 119008\n", + " MACHINERY\n", + " 119796\n", " \n", " \n", " 1\n", - " HOUSEHOLD\n", - " 120756\n", + " AUTOMOBILE\n", + " 119008\n", " \n", " \n", " 2\n", - " BUILDING\n", - " 120568\n", + " FURNITURE\n", + " 119872\n", " \n", " \n", " 3\n", - " MACHINERY\n", - " 119796\n", + " HOUSEHOLD\n", + " 120756\n", " \n", " \n", " 4\n", - " FURNITURE\n", - " 119872\n", + " BUILDING\n", + " 120568\n", " \n", " \n", "\n", @@ -346,32 +326,31 @@ ], "text/plain": [ " C_MKTSEGMENT count_star()\n", - "0 AUTOMOBILE 119008\n", - "1 HOUSEHOLD 120756\n", - "2 BUILDING 120568\n", - "3 MACHINERY 119796\n", - "4 FURNITURE 119872" + "0 MACHINERY 119796\n", + "1 AUTOMOBILE 119008\n", + "2 FURNITURE 119872\n", + "3 HOUSEHOLD 120756\n", + "4 BUILDING 120568" ] }, - "execution_count": 18, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "con.cursor().execute('select C_MKTSEGMENT, count(*) from my_iceberg_jinjat.tpch_sf1.\"DYNAMIC_ICEBERG_TABLE_CUSTOMER\" group by all').fetch_pandas_all()" + "con.cursor().execute(\"select C_MKTSEGMENT, count(*) from my_iceberg_jinjat.tpch_sf1.dynamic_iceberg_table_customer group by all\").fetch_pandas_all()" ] }, { "cell_type": "code", - "execution_count": 31, - "id": "d01f1e0b-d4b7-4b16-b1a8-adf73b874dde", + "execution_count": 27, + "id": "88d8a111-9e2e-4738-87e9-e43c53c0f4f5", "metadata": { "ExecuteTime": { - "end_time": "2024-08-23T14:34:49.413Z", - "start_time": "2024-08-23T14:34:49.012550Z" - }, - "collapsed": false + "end_time": "2024-08-23T14:35:05.027142Z", + "start_time": "2024-08-23T14:34:51.583357Z" + } }, "outputs": [ { @@ -395,68 +374,37 @@ " \n", " \n", " \n", - " C_MKTSEGMENT\n", " count_star()\n", " \n", " \n", " \n", " \n", " 0\n", - " MACHINERY\n", - " 119796\n", - " \n", - " \n", - " 1\n", - " AUTOMOBILE\n", - " 119008\n", - " \n", - " \n", - " 2\n", - " FURNITURE\n", - " 119872\n", - " \n", - " \n", - " 3\n", - " BUILDING\n", - " 120568\n", - " \n", - " \n", - " 4\n", - " HOUSEHOLD\n", - " 120756\n", + " 1500000000\n", " \n", " \n", "\n", "" ], "text/plain": [ - " C_MKTSEGMENT count_star()\n", - "0 MACHINERY 119796\n", - "1 AUTOMOBILE 119008\n", - "2 FURNITURE 119872\n", - "3 BUILDING 120568\n", - "4 HOUSEHOLD 120756" + " count_star()\n", + "0 1500000000" ] }, - "execution_count": 31, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "con.cursor().execute(\"select C_MKTSEGMENT, count(*) from my_iceberg_jinjat.tpch_sf1.dynamic_iceberg_table_customer group by all\").fetch_pandas_all()" + "con.cursor().execute(\"select count(*) from my_iceberg_jinjat.tpch_sf1.orders_iceberg_tpch_sf1000\").fetch_pandas_all()" ] }, { "cell_type": "code", - "execution_count": 32, - "id": "88d8a111-9e2e-4738-87e9-e43c53c0f4f5", - "metadata": { - "ExecuteTime": { - "end_time": "2024-08-23T14:35:05.027142Z", - "start_time": "2024-08-23T14:34:51.583357Z" - } - }, + "execution_count": 28, + "id": "5be1a409-d43e-4e5a-bae1-df3bc32f9a8d", + "metadata": {}, "outputs": [ { "data": { @@ -561,7 +509,7 @@ "[1000 rows x 2 columns]" ] }, - "execution_count": 32, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -573,10 +521,8 @@ { "cell_type": "code", "execution_count": null, - "id": "3bf62429db6fdb4f", - "metadata": { - "collapsed": false - }, + "id": "22864020-2b0b-46b5-94be-c74a6e691fbb", + "metadata": {}, "outputs": [], "source": [] }