Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project Nessie - Create branch failure using spark #9404

Open
zaidabdulla opened this issue Aug 24, 2024 · 2 comments
Open

Project Nessie - Create branch failure using spark #9404

zaidabdulla opened this issue Aug 24, 2024 · 2 comments

Comments

@zaidabdulla
Copy link

Issue description

Hi,

I encountered branch create issue wit project nessie. Sharing error message as well as attaching script, point to be noted it's failing at last command i.e. 'CREATE BRANCH'. Kindly assist.

Script.txt

pyspark version: 3.5.1
python version: 3.9.18

I tried both of below versions one after the other but no luck
iceberg-spark-runtime-3.3_2.12:1.3.1
nessie-spark-extensions-3.3_2.12:0.67.0

OR

iceberg-spark-runtime-3.5_2.12:1.5.2
nessie-spark-extensions-3.5_2.12:0.95.0

Error:

ParseException Traceback (most recent call last)
Cell In[3], line 77
72 spark.sql("SELECT * FROM nessie.pokemons.names.history;").toPandas()
74 #spark.sql("SELECT * FROM nessie.pokemons.names").toPandas()
75 #spark
---> 77 spark.sql("CREATE BRANCH IF NOT EXISTS develop IN nessie from main").show()
78 #spark.sql("LIST REFERENCES IN nessie").toPandas()
79 #spark.sql("USE REFERENCE main IN nessie").toPandas()

File /opt/spark/python/pyspark/sql/session.py:1631, in SparkSession.sql(self, sqlQuery, args, **kwargs)
1627 assert self._jvm is not None
1628 litArgs = self._jvm.PythonUtils.toArray(
1629 [_to_java_column(lit(v)) for v in (args or [])]
1630 )
-> 1631 return DataFrame(self._jsparkSession.sql(sqlQuery, litArgs), self)
1632 finally:
1633 if len(kwargs) > 0:

File /opt/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py:1322, in JavaMember.call(self, *args)
1316 command = proto.CALL_COMMAND_NAME +
1317 self.command_header +
1318 args_command +
1319 proto.END_COMMAND_PART
1321 answer = self.gateway_client.send_command(command)
-> 1322 return_value = get_return_value(
1323 answer, self.gateway_client, self.target_id, self.name)
1325 for temp_arg in temp_args:
1326 if hasattr(temp_arg, "_detach"):

File /opt/spark/python/pyspark/errors/exceptions/captured.py:185, in capture_sql_exception..deco(*a, **kw)
181 converted = convert_exception(e.java_exception)
182 if not isinstance(converted, UnknownException):
183 # Hide where the exception came from that shows a non-Pythonic
184 # JVM exception message.
--> 185 raise converted from None
186 else:
187 raise

ParseException:
[PARSE_SYNTAX_ERROR] Syntax error at or near 'BRANCH'.(line 1, pos 7)

== SQL ==
CREATE BRANCH IF NOT EXISTS develop IN nessie from main
-------^^^

Thanks
Zaid

@blochstrinity
Copy link

You're gonna want to edit your post, you left your access keys in the text file.

@snazy
Copy link
Member

snazy commented Oct 10, 2024

@zaidabdulla can you please ask this on our Zulip Chat?
GH issues are rather only for identified bugs and coding related tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants