@altertable/cli 1.13.3 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +27 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9179,7 +9179,7 @@ function redactResponseBodyForDebug(body) {
|
|
|
9179
9179
|
}
|
|
9180
9180
|
|
|
9181
9181
|
// src/version.ts
|
|
9182
|
-
var VERSION = "1.
|
|
9182
|
+
var VERSION = "1.14.0";
|
|
9183
9183
|
var USER_AGENT = `altertable-cli/${VERSION}`;
|
|
9184
9184
|
|
|
9185
9185
|
// src/lib/http.ts
|
|
@@ -16769,6 +16769,14 @@ async function executeLakehouseQuery(input, execution, streaming) {
|
|
|
16769
16769
|
async function executeLakehouseQueryBytes(input, execution) {
|
|
16770
16770
|
return sendHttpStream(buildLakehouseQueryRequest(input, true), execution);
|
|
16771
16771
|
}
|
|
16772
|
+
function buildLakehouseQueryListRequest() {
|
|
16773
|
+
return {
|
|
16774
|
+
plane: "lakehouse",
|
|
16775
|
+
method: "GET",
|
|
16776
|
+
endpoint: "/queries",
|
|
16777
|
+
retry: true
|
|
16778
|
+
};
|
|
16779
|
+
}
|
|
16772
16780
|
function buildLakehouseQueryShowRequest(queryId) {
|
|
16773
16781
|
return {
|
|
16774
16782
|
plane: "lakehouse",
|
|
@@ -22944,6 +22952,22 @@ function parseQueryStatement(statementArg) {
|
|
|
22944
22952
|
return statement;
|
|
22945
22953
|
}
|
|
22946
22954
|
|
|
22955
|
+
// src/commands/query/list.ts
|
|
22956
|
+
var queryListCommand = defineCommand({
|
|
22957
|
+
metadata: {
|
|
22958
|
+
name: "list",
|
|
22959
|
+
description: "List running queries in the current environment."
|
|
22960
|
+
},
|
|
22961
|
+
async run({ execution, sink }) {
|
|
22962
|
+
const response = await sendHttp(buildLakehouseQueryListRequest(), execution);
|
|
22963
|
+
if (!sink.json && extractManagementRows(parseApiJson(response)).length === 0) {
|
|
22964
|
+
await writeCommandOutput({ kind: "human", text: "No running queries." }, sink);
|
|
22965
|
+
return;
|
|
22966
|
+
}
|
|
22967
|
+
await writeCommandOutput({ kind: "tabular", body: response }, sink);
|
|
22968
|
+
}
|
|
22969
|
+
});
|
|
22970
|
+
|
|
22947
22971
|
// src/commands/query/show.ts
|
|
22948
22972
|
var queryShowCommand = defineCommand({
|
|
22949
22973
|
metadata: {
|
|
@@ -22974,11 +22998,13 @@ var queryCommand = defineCommand({
|
|
|
22974
22998
|
'altertable query "SELECT event, timestamp FROM analytics.main.events ORDER BY timestamp DESC LIMIT 10" --json',
|
|
22975
22999
|
'altertable query "SELECT 1" --format csv --output results.csv',
|
|
22976
23000
|
"altertable query @report.sql --format csv --output results.csv",
|
|
23001
|
+
"altertable query list",
|
|
22977
23002
|
"altertable query show <query-id>"
|
|
22978
23003
|
]
|
|
22979
23004
|
},
|
|
22980
23005
|
args: queryRunArgs,
|
|
22981
23006
|
subcommands: {
|
|
23007
|
+
list: queryListCommand,
|
|
22982
23008
|
show: queryShowCommand,
|
|
22983
23009
|
cancel: queryCancelCommand
|
|
22984
23010
|
},
|