Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "metabase-create-dashboard",
name: "Create Dashboard",
description: "Create a new Dashboard. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidashboard/post/api/dashboard/).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
app,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "metabase-get-dashboard",
name: "Get Dashboard",
description: "Retrieve dashboard information and its cards. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidashboard/get/api/dashboard/{id}).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
app,
Expand Down
2 changes: 1 addition & 1 deletion components/metabase/actions/get-database/get-database.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "metabase-get-database",
name: "Get Database",
description: "Retrieve database information. [See the documentation](https://www.metabase.com/docs/latest/api#tag/apidatabase/get/api/database/{id}).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
app,
Expand Down
21 changes: 19 additions & 2 deletions components/metabase/actions/run-query/run-query.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import app from "../../metabase.app.mjs";
export default {
key: "metabase-run-query",
name: "Run Query",
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).",
version: "0.0.1",
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).",
version: "0.0.2",
type: "action",
props: {
app,
Expand All @@ -20,19 +20,36 @@ export default {
description: "Whether to ignore the cache and run the query again",
optional: true,
},
dashboardId: {
propDefinition: [
app,
"dashboardId",
],
optional: true,
},
collectionPreview: {
type: "boolean",
label: "Collection Preview",
description: "Whether to return the collection preview",
optional: true,
},
},
async run({ $ }) {
const {
app,
cardId,
ignoreCache,
dashboardId,
collectionPreview,
} = this;

const response = await app.runCardQuery({
$,
cardId,
data: {
ignore_cache: ignoreCache,
dashboard_id: dashboardId,
collection_preview: collectionPreview,
},
});

Expand Down
2 changes: 1 addition & 1 deletion components/metabase/metabase.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default {
cardId, ...args
} = {}) {
return this.post({
path: `/card/pivot/${cardId}/query`,
path: `/card/${cardId}/query`,
...args,
});
},
Expand Down
2 changes: 1 addition & 1 deletion components/metabase/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/metabase",
"version": "0.1.0",
"version": "0.1.1",
"description": "Pipedream Metabase Components",
"main": "metabase.app.mjs",
"keywords": [
Expand Down
Loading