This Week in Databend #114
PsiACEOct 8, 2023
Databend is a modern cloud data warehouse, serving your massive-scale analytics needs at low cost and complexity. Open source alternative to Snowflake. Also available in the cloud: https://app.databend.com .
What's On In Databend
Stay connected with the latest news about Databend.
MERGE
The
MERGE
INSERT
UPDATE
DELETE
A
MERGE
MATCHED
NOT MATCHED
MATCHED
UPDATE
DELETE
NOT MATCHED
INSERT
-- Merge data into 'salaries' based on employee details from 'employees'
MERGE INTO salaries
USING (SELECT * FROM employees)
ON salaries.employee_id = employees.employee_id
WHEN MATCHED AND employees.department = 'HR' THEN
UPDATE SET
salaries.salary = salaries.salary + 1000.00
WHEN MATCHED THEN
UPDATE SET
salaries.salary = salaries.salary + 500.00
WHEN NOT MATCHED THEN
INSERT (employee_id, salary)
VALUES (employees.employee_id, 55000.00);
is currently in an experimental state. Before using theMERGE
command, you need to runMERGE
to enable the feature.SET enable_experimental_merge_into = 1;
If you are interested in learning more, please check out the resources below:
Code Corner
Discover some fascinating code snippets or projects that showcase our work or learning journey.
Introducing DATABEND_DATA_PATH
to Python Binding and Local Mode
DATABEND_DATA_PATH
Databend's local mode now allows users to control the storage location of metadata and data files by setting the
DATABEND_DATA_PATH
DATABEND_DATA_PATH=/tmp/data/ databend-query local -q "create table abc(a int); insert into abc values(3);"
DATABEND_DATA_PATH
databend
import os
os.environ["DATABEND_DATA_PATH"] = "/tmp/def/"
from databend import SessionContext
If you are interested in learning more, please check out the resources below:
Highlights
We have also made these improvements to Databend that we hope you will find helpful:
- Improved Hash Join, resulting in a 10% performance improvement in certain scenarios.
- Enhanced distributed execution of MERGE.
- Improved CI by using to install relevant binary tools and executing unit tests with
quickinstall
.nextest
What's Up Next
We're always open to cutting-edge technologies and innovative ideas. You're more than welcome to join the community and bring them to Databend.
Delete Files When Dropping Internal Stage
In Databend, an Internal Stage stores data files in the storage backend specified in
databend-query.toml
Considering that users will not be able to access the staged files after dropping an Internal Stage, it is necessary to remove the staged files when dropping the Internal Stage.
Issue #12986 | remove files at the same time of drop internal stage
Please let us know if you're interested in contributing to this feature, or pick up a good first issue at https://link.databend.com/i-m-feeling-lucky to get started.
Changelog
You can check the changelog of Databend Nightly for details about our latest developments.
Full Changelog: https://github.com/datafuselabs/databend/compare/v1.2.137-nightly...v1.2.147-nightly
Subscribe to our newsletter
Stay informed on feature releases, product roadmap, support, and cloud offerings!