Skip to content

Commit

Permalink
Release v0.4.0 (#91)
Browse files Browse the repository at this point in the history
* Added catalog and schema parameters to execute and fetch
([#90](#90)). In this
release, we have added optional `catalog` and `schema` parameters to the
`execute` and `fetch` methods in the `SqlBackend` abstract base class,
allowing for more flexibility when executing SQL statements in specific
catalogs and schemas. These updates include new method signatures and
their respective implementations in the `SparkSqlBackend` and
`DatabricksSqlBackend` classes. The new parameters control the catalog
and schema used by the `SparkSession` instance in the `SparkSqlBackend`
class and the `SqlClient` instance in the `DatabricksSqlBackend` class.
This enhancement enables better functionality in multi-catalog and
multi-schema environments. Additionally, this change comes with unit
tests and integration tests to ensure proper functionality. The new
parameters can be used when calling the `execute` and `fetch` methods.
For example, with a `SparkSqlBackend` instance `spark_backend`, you can
execute a SQL statement in a specific catalog and schema with the
following code: `spark_backend.execute("SELECT * FROM my_table",
catalog="my_catalog", schema="my_schema")`. Similarly, the `fetch`
method can also be used with the new parameters.
  • Loading branch information
nfx authored Apr 11, 2024
1 parent 91978c0 commit 8f3d164
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Version changelog

## 0.4.0

* Added catalog and schema parameters to execute and fetch ([#90](https://github.com/databrickslabs/lsql/issues/90)). In this release, we have added optional `catalog` and `schema` parameters to the `execute` and `fetch` methods in the `SqlBackend` abstract base class, allowing for more flexibility when executing SQL statements in specific catalogs and schemas. These updates include new method signatures and their respective implementations in the `SparkSqlBackend` and `DatabricksSqlBackend` classes. The new parameters control the catalog and schema used by the `SparkSession` instance in the `SparkSqlBackend` class and the `SqlClient` instance in the `DatabricksSqlBackend` class. This enhancement enables better functionality in multi-catalog and multi-schema environments. Additionally, this change comes with unit tests and integration tests to ensure proper functionality. The new parameters can be used when calling the `execute` and `fetch` methods. For example, with a `SparkSqlBackend` instance `spark_backend`, you can execute a SQL statement in a specific catalog and schema with the following code: `spark_backend.execute("SELECT * FROM my_table", catalog="my_catalog", schema="my_schema")`. Similarly, the `fetch` method can also be used with the new parameters.


## 0.3.1

* Check UCX and LSQL for backwards compatibility ([#78](https://github.com/databrickslabs/lsql/issues/78)). In this release, we introduce a new GitHub Actions workflow, downstreams.yml, which automates unit testing for downstream projects upon changes made to the upstream project. The workflow runs on pull requests, merge groups, and pushes to the main branch and sets permissions for id-token, contents, and pull-requests. It includes a compatibility job that runs on Ubuntu, checks out the code, sets up Python, installs the toolchain, and accepts downstream projects using the databrickslabs/sandbox/downstreams action. The job matrix includes two downstream projects, ucx and remorph, and uses the build cache to speed up the pip install step. This feature ensures that changes to the upstream project do not break compatibility with downstream projects, maintaining a stable and reliable library for software engineers.
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/labs/lsql/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.1"
__version__ = "0.4.0"

0 comments on commit 8f3d164

Please sign in to comment.