Skip to content

Commit 893f01c

Browse files
authored
Remove false warning on DataFrame.insertInto() about the default format changing from parquet to delta (#1823)
## Changes This pull request removes a spurious incompatible-format warning for `DataFrameWriter.insertInto()`. The `.insertInto()` operation uses the existing format of the underlying table; any specified format is ignored. As such use of this operation be flagged as a potential problem due to the change of the default format from `parquet` to `delta`. Incidental changes included in this PR: - Removed an unnecessary linting suppression. ### Functionality - [ ] added relevant user documentation - [ ] added new CLI command - [ ] modified existing command: `databricks labs ucx ...` - [ ] added a new workflow - [ ] modified existing workflow: `...` - [ ] added a new table - [ ] modified existing table: `...` ### Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [X] manually tested - [ ] added unit tests - [ ] added integration tests - [ ] verified on staging environment (screenshot attached)
1 parent c424e3b commit 893f01c

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

src/databricks/labs/ucx/source_code/jobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def _register_notebook(self, graph: DependencyGraph) -> Iterable[DependencyProbl
131131
path = WorkspacePath(self._ws, notebook_path)
132132
return graph.register_notebook(path)
133133

134-
def _register_spark_python_task(self, graph: DependencyGraph): # pylint: disable=unused-argument
134+
def _register_spark_python_task(self, graph: DependencyGraph):
135135
if not self._task.spark_python_task:
136136
return []
137137
notebook_path = self._task.spark_python_task.python_file

src/databricks/labs/ucx/source_code/linters/table_creation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def __init__(self, dbr_version: tuple[int, int] | None):
107107
[
108108
NoFormatPythonMatcher("writeTo", 1, 1),
109109
NoFormatPythonMatcher("table", 1, 1),
110-
NoFormatPythonMatcher("insertInto", 1, 2),
111110
NoFormatPythonMatcher("saveAsTable", 1, 4, 2, "format"),
112111
]
113112
)

tests/unit/source_code/linters/test_table_creation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
METHOD_NAMES = [
1010
"writeTo",
1111
"table",
12-
"insertInto",
1312
"saveAsTable",
1413
]
1514
ASSIGN = [True, False]

0 commit comments

Comments
 (0)