Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 06:48 AM - edited 03-20-2025 06:49 AM
> You can use IDENTIFIER(:table) to safely pass the table name, but for the tags, placeholders like ? or :key doesn’t seem to work.
This does not seem correct in my testing. This fails on a cluster running DBR 16.1:
spark.sql("alter table IDENTIFIER(:table) SET TAGS ('foo')",
args={"table": <table_name>})
File "/databricks/python/lib/python3.12/site-packages/grpc/_channel.py", line 966, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INTERNAL
details = "
[PARSE_SYNTAX_ERROR] Syntax error at or near 'TAGS'. SQLSTATE: 42601 (line 1, pos 35)