"@databricks/appkit": "0.24.0"
Issue
When I create a query list_nation.sql:
SELECT * FROM
IDENTIFIER(:target_catalog || '.redacted.nation')
Then I run npm run dev. It fails with message:
[PARSE_SYNTAX_ERROR] Syntax error at or near '.'. SQLSTATE: 42601
== SQL (line 2, position 1) ==
IDENTIFIER('' || '.redacted.nation')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Describing 3 queries (3/3)
Typegen Queries (3)
──────────────────────────────────────────────────
cache MISS hello_world
ERROR list_nation PARSE_SYNTAX_ERROR
cache MISS mocked_sales
──────────────────────────────────────────────────
2 new, 0 from cache, 1 error. 1.52s
file:///home/aborsato/dev/minipack/node_modules/@databricks/appkit/dist/type-generator/index.js:48
throw new Error([
^
Error: Type generation failed: 1 query could not be described: list_nation.
DESCRIBE QUERY failed for these queries — see the error codes above for details.
Common causes: SQL syntax errors, missing tables/views, or warehouse format incompatibilities.
To debug: run the failing query directly in a SQL editor against warehouse 7bd33a82f4e92206.
at Module.generateFromEntryPoint (file:///home/redacted/dev/minipack/node_modules/@databricks/appkit/dist/type-generator/index.js:48:9)
at async Command.runGenerateTypes (file:///home/redacted/dev/minipack/node_modules/@databricks/appkit/dist/cli/commands/generate-types.js:19:5)
Workaround
At this time, there is no workaround I can use to solve it because I can't specify a default catalog and making the query with a hardcoded catalog name will make the code unportable to other environments. I considered adding a template script to generate the .sql files before the compilation but it adds accidental complexity to the build process.
"@databricks/appkit": "0.24.0"
Issue
When I create a query
list_nation.sql:Then I run
npm run dev. It fails with message:Workaround
At this time, there is no workaround I can use to solve it because I can't specify a default catalog and making the query with a hardcoded catalog name will make the code unportable to other environments. I considered adding a template script to generate the .sql files before the compilation but it adds accidental complexity to the build process.