SQL Identifier clause
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 01:28 AM
Hi,
I was trying to prepare some dynamic SQLs to create table using the IDENTIFIER clause and WITH AS clause, but I'm stuck on some bug as it seems.
could someone verify it or tell me that I am doing something wrong?
code is running on SQL Warehouse
Thanks in advance
Case 1 => Create Table Conventional => Success
Case 2 => Create Table using IDENTIFIER clause (without with as clause) => Success
Case 3 => Create Table using IDENTIFIER clause and using WITH AS clause => FAIL
I've tried using brackets around with as and select, didn't help ..
Any suggestions?
#identifier #sql
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 03:31 PM
Hello @jura ,
I'm Raphael and i'll be helping you out.
The approach below should work:
USE CATALOG dev;
CREATE OR REPLACE TABLE IDENTIFIER("bronze.jura_test")
as SELECT ...
Please let me know the outcome and feel free to ask any further questions. If my response addresses your needs then please mark it as the official solution.
Thanks!
Raphael Balogo
Sr. Technical Solutions Engineer
Databricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 12:28 AM
Hi @raphaelblg
thanks for your answer, but this doesn't work.
Problem is in WITH AS clause, when it is used in combination of CREATE TABLE and IDENTIFIER functions. Your example is same as my case 2 in opening post.
Do you have any other propositions ?
Another thing that I've found is that in SQL notebook + SQL Warehouse parameters cannot be used for some commands, i.e. USE CATALOG.
Thanks for your answer, but if you have any other suggestions, feel free to share
br
Dino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 01:41 AM
Hey, I am struck with the same issue, did you find any workaround. I am trying to run DESCRIBE & ALTER command using IDENTIFIER() using databricks-sql-connector. Did u figure out how to run the identifier command statements??

