mrchristine / db-migration

Databricks Migration Tools
Other
43 stars 27 forks source link

import issue #12

Closed raknaik closed 4 years ago

raknaik commented 4 years ago

Tried pulling the changed code and tried re-importing the issue DDL.

But looks like similar error.

n\nDuring handling of the above exception, another exception occurred:\n\nParseException Traceback (most recent call last)\n in \n 2 )\n 3 USING delta\n----> 4 LOCATION \'dbfs:/mnt/Test-databricks/use_cases/tp_reservoir/dev/dtc_monitor/databricks_output/xentry_valid_readouts_clustered\' """)\n\n/databricks/spark/python/pyspark/sql/session.py in sql(self, sqlQuery)\n 702 [Row(f1=1, f2=u\'row1\'), Row(f1=2, f2=u\'row2\'), Row(f1=3, f2=u\'row3\')]\n 703 """\n--> 704 return DataFrame(self._jsparkSession.sql(sqlQuery), self._wrapped)\n 705 \n 706 @since(2.0)\n\n/databricks/spark/python/lib/py4j-0.10.9-src.zip/py4j/java_gateway.py in call(self, args)\n 1303 answer = self.gateway_client.send_command(command)\n 1304 return_value = get_return_value(\n-> 1305 answer, self.gateway_client, self.target_id, self.name)\n 1306 \n 1307 for temp_arg in temp_args:\n\n/databricks/spark/python/pyspark/sql/utils.py in deco(a, **kw)\n 100 converted = convert_exception(e.java_exception)\n 101 if not isinstance(converted, UnknownException):\n--> 102 raise converted\n 103 else:\n 104 raise\n\nParseException: \nno viable alternative at input \'CREATE TABLE dtc_monitor.xentry_valid_readouts_clustered (\n )\'(line 2, pos 2)\n\n== SQL ==\n CREATE TABLE dtc_monitor.xentry_valid_readouts_clustered (\n )\n--^^^\nUSING delta\nLOCATION \'dbfs:/mnt/Test-databricks/use_cases/tp_reservoir/dev/dtc_monitor/databricks_output/xentry_valid_readouts_clustered\''} Complete Metastore Import Time: 0:06:29.123450

mrchristine commented 4 years ago

It's unclear how this is failing. Can you find the local log file for this table and see if you can apply this table DDL manually? I'd be interested to understand if there's a syntax issue on your system of how this is stored.

The logs should be stored under logs/metastore/DATABASE_NAME/TABLE_NAME.