- 2861 Views
- 1 replies
- 0 kudos
How do i create an array from a field while applying sorting?how do I do this in data brick since databricks does not support order by in array_agg? same is possible in Snowflake and(Array agg) or Redshift(listagg). SELECT ARRAY_AGG(O_ORDERKEY) WITH...
- 2861 Views
- 1 replies
- 0 kudos
Latest Reply
%sql
SELECT array_sort(array_agg(col)
,(left, right) -> CASE WHEN left < right THEN -1
WHEN left > right THEN 1 ELSE 0 END) arr_col FROM VALUES (3), (2), (1) AS tab(col); https://docs.databricks.com/en/sql/language-manual/functions/array_sort.h...
- 3007 Views
- 2 replies
- 0 kudos
I have a Python Databricks notebook which I want to call/run another Databricks notebook using dbutils.notebook.run()... but I want to run all the cells in the "called" notebook except the last one.Is there a way to do a count of cells in the called ...
- 3007 Views
- 2 replies
- 0 kudos
Latest Reply
In the alternative way, you can use dbutils.notebook.run to pass the parameters, and use dbutils.widgets.get in another notebook to get the parameter values,and determine the parameter values to decide whether to execute codes in the specified cellh...
1 More Replies