Hi,
I'm trying to set up a local development environment using python / vscode / poetry. Also, linting is enabled (Microsoft pylance extension) and the python.analysis.typeCheckingMode is set to strict.
We are using python files for our code (.py) whith the "# Databricks notebook source" comment at the begin. That kind of files are handled as notebooks by Databrick
I don't want to connect and execute databricks command from the terminal of vscode.
The question is: which modules shall I import in order to have a valid python file, withouth vscode "problems".
For instance:
from databricks.sdk import runtime as KR
histogram = KR.spark.sql("some sql")
will raise a the following problem:
Type of "sql" is partially unknown
Type of "sql" is "(sqlQuery: str, args: Dict[str, Any] | List[Unknown] | None = None, **kwargs: Any) -> DataFrame"PylancereportUnknownMemberType
(variable) spark: SparkSession
Regards,
Alexandru Stan