cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable pass array of tables names from for each and send it task param

sivaram_mandepu
New Contributor

sending below array list from for each task

["mv_t005u","mv_t005t","mv_t880"]
 
In the task , iam reading value as
 
key :mv_name
value :{{input}}
 
but in note book i am getting below error
Note book code:
%sql
REFRESH MATERIALIZED VIEW nonprod_emea.silver_location.${mv_name}
error: Its keep on giving issue with \n
REFRESH statements cannot contain ' ', '\n', '\r', '\t' inside unquoted resource paths.
File <command-5604424783070824>, line 1 ----> 1 get_ipython().run_cell_magic('sql', '', 'REFRESH MATERIALIZED VIEW nonprod_emea.silver_location.{{input.mv_name}}\n')

File /databricks/python/lib/python3.11/site-packages/pyspark/sql/connect/client/core.py:2149, in SparkConnectClient._handle_rpc_error(self, rpc_error) 2134 raise Exception( 2135 "Python versions in the Spark Connect client and server are different. " 2136 "To execute user-defined functions, client and server should have the " (...) 2145 "https://docs.databricks.com/en/release-notes/serverless.html" target="_blank" rel="noopener noreferrer">https://docs.databricks.com/en/release-notes/serverless.html</a>.</span><span>&quot;</span> 2146 ) 2147 # END-EDGE -> 2149 raise convert_exception( 2150 info, 2151 status.message, 2152 self._fetch_enriched_error(info), 2153 self._display_server_stack_trace(), 2154 ) from None 2156 raise SparkConnectGrpcException(status.message) from None 2157 else:

 Please help to resolve the issue

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now