Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 05:43 PM - edited 03-23-2025 05:45 PM
Since it doesn't recognize the catalog, it says unexpected word or extra word. 'workspace' is my unity catalog name. See below:
Error:
"/home/runner/work/Wine_Quality_Prediction_Model/Wine_Quality_Prediction_Model/notebooks/train_model_py.py", line 65, in load_data
26 spark.sql("USE CATALOG workspace;")
27 File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pyspark/sql/session.py", line 1631, in sql
28 return DataFrame(self._jsparkSession.sql(sqlQuery, litArgs), self)
29 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/py4j/java_gateway.py", line 1322, in __call__
31 return_value = get_return_value(
32 ^^^^^^^^^^^^^^^^^
33 File "/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/pyspark/errors/exceptions/captured.py", line 185, in deco
34 raise converted from None
35pyspark.errors.exceptions.captured.ParseException:
36[PARSE_SYNTAX_ERROR] Syntax error at or near 'workspace': extra input 'workspace'.(line 1, pos 12)
38== SQL ==
39USE CATALOG workspace;
40------------^^^
I also printed what catalogs and schemas it can see. This is the output I got in the GitHub Actions output:
I also printed what catalogs and schemas it can see. This is the output I got in the GitHub Actions output:
spark version: 3.5.5
Current Schema: default
Catalogs: ['spark_catalog']