cancel
Showing results for 
Search instead for 
Did you mean: 
Community Discussions
cancel
Showing results for 
Search instead for 
Did you mean: 

LLM Chatbot With Retrieval Augmented Generation (RAG)

amitpphatak
New Contributor II

When executing the second block under 

01-Data-Preparation-and-Index

I get the following error. Please help.

 

AnalysisException: [RequestId=c9625879-339d-45c6-abb5-f70d724ddb47 ErrorClass=INVALID_STATE] Metastore storage root URL does not exist.Please provide a storage location for the catalog (for example 'CREATE CATALOG myCatalog MANAGED LOCATION '<location-path>'). Alternatively set up a metastore root storage location to provide a storage location for all catalogs in the metastore.
File <command-666025524924316>, line 13 11 catalogs = [r['catalog'] for r in spark.sql("SHOW CATALOGS").collect()] 12 if catalog not in catalogs: ---> 13 spark.sql(f"CREATE CATALOG IF NOT EXISTS {catalog}") 14 if catalog == 'dbdemos': 15 spark.sql(f"ALTER CATALOG {catalog} OWNER TO `account users`")

File /databricks/spark/python/pyspark/errors/exceptions/captured.py:230, in capture_sql_exception.<locals>.deco(*a, **kw) 226 converted = convert_exception(e.java_exception) 227 if not isinstance(converted, UnknownException): 228 # Hide where the exception came from that shows a non-Pythonic 229 # JVM exception message. --> 230 raise converted from None 231 else: 232 raise
1 REPLY 1

amitpphatak
New Contributor II

I fixed this issue by providing a MANAGED LOCATION for the catalog - meant updating the _resources/00-init file as follows - 

spark.sql(f"CREATE CATALOG IF NOT EXISTS {catalog} MANAGED LOCATION '<location path>'")
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.