(sql)
| 9 | prepare the test samples |
| 10 | ''' |
| 11 | def execute_sql(sql): |
| 12 | conn = psycopg2.connect(database='tpch10x', |
| 13 | user='xxx', |
| 14 | password='xxx', |
| 15 | host='xxx', |
| 16 | port=xxx) |
| 17 | |
| 18 | cur = conn.cursor() |
| 19 | cur.execute(sql) |
| 20 | # res = cur.fetchall()[0][0][0] |
| 21 | res = cur.fetchall() |
| 22 | |
| 23 | conn.commit() |
| 24 | cur.close() |
| 25 | conn.close() |
| 26 | |
| 27 | return len(res) |
| 28 | |
| 29 | # Load the JSON file as a dictionary |
| 30 | data = {} |