Skip to content

Commit be3c4eb

Browse files
committed
update runCardQuery endpoint
1 parent eccf8d3 commit be3c4eb

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

components/metabase/actions/create-dashboard/create-dashboard.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "metabase-create-dashboard",
66
name: "Create Dashboard",
77
description: "Create a new Dashboard. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidashboard/post/api/dashboard/).",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
app,

components/metabase/actions/get-dashboard/get-dashboard.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "metabase-get-dashboard",
55
name: "Get Dashboard",
66
description: "Retrieve dashboard information and its cards. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidashboard/get/api/dashboard/{id}).",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
app,

components/metabase/actions/get-database/get-database.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "metabase-get-database",
55
name: "Get Database",
66
description: "Retrieve database information. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidatabase/get/api/database/{id}).",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
app,

components/metabase/actions/run-query/run-query.mjs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import app from "../../metabase.app.mjs";
33
export default {
44
key: "metabase-run-query",
55
name: "Run Query",
6-
description: "Execute a saved question/card and return the results. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apicard/post/api/card/pivot/{card-id}/query).",
7-
version: "0.0.1",
6+
description: "Execute a saved question/card and return the results. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apicard/post/api/card/{card-id}/query).",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
app,
@@ -20,19 +20,36 @@ export default {
2020
description: "Whether to ignore the cache and run the query again",
2121
optional: true,
2222
},
23+
dashboardId: {
24+
propDefinition: [
25+
app,
26+
"dashboardId",
27+
],
28+
optional: true,
29+
},
30+
collectionPreview: {
31+
type: "boolean",
32+
label: "Collection Preview",
33+
description: "Whether to return the collection preview",
34+
optional: true,
35+
},
2336
},
2437
async run({ $ }) {
2538
const {
2639
app,
2740
cardId,
2841
ignoreCache,
42+
dashboardId,
43+
collectionPreview,
2944
} = this;
3045

3146
const response = await app.runCardQuery({
3247
$,
3348
cardId,
3449
data: {
3550
ignore_cache: ignoreCache,
51+
dashboard_id: dashboardId,
52+
collection_preview: collectionPreview,
3653
},
3754
});
3855

components/metabase/metabase.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export default {
136136
cardId, ...args
137137
} = {}) {
138138
return this.post({
139-
path: `/card/pivot/${cardId}/query`,
139+
path: `/card/${cardId}/query`,
140140
...args,
141141
});
142142
},

components/metabase/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/metabase",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Metabase Components",
55
"main": "metabase.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)