Title: How to insert arrays into ARRAY
Open Graph Title: How to insert arrays into ARRAY
X Title: How to insert arrays into ARRAY
Description: Hi! I am trying to insert an string array into a table with an ARRAY column, but it doesn't seem to register my Python string list. CREATE TABLE prod_catalog.eu_projects.project_export (project_id bigint, categories ARRAY
Open Graph Description: Hi! I am trying to insert an string array into a table with an ARRAY column, but it doesn't seem to register my Python string list. CREATE TABLE prod_catalog.eu_projects.project_export (project_id ...
X Description: Hi! I am trying to insert an string array into a table with an ARRAY column, but it doesn't seem to register my Python string list. CREATE TABLE prod_catalog.eu_projects.project_export (project...
Opengraph URL: https://github.com/databricks/databricks-sql-python/issues/694
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to insert arrays into ARRAY\u003cSTRING\u003e columns using native parameters?","articleBody":"Hi!\n\nI am trying to insert an string array into a table with an ARRAY\u003cSTRING\u003e column, but it doesn't seem to register my Python string list.\n\n```sql\nCREATE TABLE prod_catalog.eu_projects.project_export (project_id bigint, categories ARRAY\u003cSTRING\u003e);\n```\n\n```python\ndef insert_test():\n data = {\n \"project_id\": 123456,\n \"categories\": [\n \"Public Sector\",\n \"Healthcare\",\n ],\n }\n with get_databricks_connection() as connection:\n cursor = connection.cursor()\n cursor.execute(\n \"INSERT INTO prod_catalog.eu_projects.project_export(project_id, categories) VALUES (:project_id, Array(:categories))\",\n data\n )\n print(\"Test insert completed.\")\n```\n\nThis ends up as an empty array. If I check query history on the SQL Warehouse, it says that categories was an empty array []\n\nI have tried to read [the documentation](https://github.com/databricks/databricks-sql-python/blob/main/docs/parameters.md#named-paramstyle-usage-example), but it is very confusing.\n\nI am using the following versions\nPython 3.13.7\ndatabricks-sql-connector==4.1.3\ndatabricks-sdk==0.66.0","author":{"url":"https://github.com/excavator-matt","@type":"Person","name":"excavator-matt"},"datePublished":"2025-09-25T12:07:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/694/databricks-sql-python/issues/694"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0d01ca37-f09a-c325-69e5-c48f9d9ddea2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC42:1FA80:A66AB5:E14C4E:6971C810 |
| html-safe-nonce | 2d8cba2dc054721be56b98761e2160131e2300c8b0012cf4706d8872b4fec977 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzQyOjFGQTgwOkE2NkFCNTpFMTRDNEU6Njk3MUM4MTAiLCJ2aXNpdG9yX2lkIjoiNTU0MjU3NDI3Njk5Mzk5MjcyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a9a4036fc7710df4875388a2298b7173786d7bb9222adc0b541061ce29d68e45 |
| hovercard-subject-tag | issue:3453325444 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/databricks/databricks-sql-python/694/issue_layout |
| twitter:image | https://avatars.githubusercontent.com/u/4998052?s=400&v=4 |
| twitter:card | summary |
| og:image | https://avatars.githubusercontent.com/u/4998052?s=400&v=4 |
| og:image:alt | Hi! I am trying to insert an string array into a table with an ARRAY column, but it doesn't seem to register my Python string list. CREATE TABLE prod_catalog.eu_projects.project_export (project_id ... |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | excavator-matt |
| hostname | github.com |
| expected-hostname | github.com |
| None | ac615aa66802dad9a938c6abe95edf09ee43c0c7f508315b64b08612858ef32e |
| turbo-cache-control | no-preview |
| go-import | github.com/databricks/databricks-sql-python git https://github.com/databricks/databricks-sql-python.git |
| octolytics-dimension-user_id | 4998052 |
| octolytics-dimension-user_login | databricks |
| octolytics-dimension-repository_id | 493695132 |
| octolytics-dimension-repository_nwo | databricks/databricks-sql-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 493695132 |
| octolytics-dimension-repository_network_root_nwo | databricks/databricks-sql-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6b618569a5f93e0b31f97f620112341421ef5f69 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width