Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
cfe0dd48
Commit
cfe0dd48
authored
6 years ago
by
Simon Belak
Browse files
Options
Downloads
Patches
Plain Diff
Don't fingerprint results when exporting data
parent
a355411b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/api/card.clj
+7
-5
7 additions, 5 deletions
src/metabase/api/card.clj
src/metabase/api/dataset.clj
+3
-1
3 additions, 1 deletion
src/metabase/api/dataset.clj
with
10 additions
and
6 deletions
src/metabase/api/card.clj
+
7
−
5
View file @
cfe0dd48
...
...
@@ -555,10 +555,11 @@
(
u/emoji
"💾"
))
ttl-seconds
))))
(
defn-
query-for-card
[
card
parameters
constraints
]
(
defn-
query-for-card
[
card
parameters
constraints
middleware
]
(
let
[
query
(
assoc
(
:dataset_query
card
)
:constraints
constraints
:parameters
parameters
)
:parameters
parameters
:middleware
middleware
)
ttl
(
when
(
public-settings/enable-query-caching
)
(
or
(
:cache_ttl
card
)
(
query-magic-ttl
query
)))]
...
...
@@ -567,12 +568,12 @@
(
defn
run-query-for-card
"Run the query for Card with PARAMETERS and CONSTRAINTS, and return results in the usual format."
{
:style/indent
1
}
[
card-id
&
{
:keys
[
parameters
constraints
context
dashboard-id
]
[
card-id
&
{
:keys
[
parameters
constraints
context
dashboard-id
middleware
]
:or
{
constraints
qp/default-query-constraints
context
:question
}}]
{
:pre
[(
u/maybe?
sequential?
parameters
)]}
(
let
[
card
(
api/read-check
(
Card
card-id
))
query
(
query-for-card
card
parameters
constraints
)
query
(
query-for-card
card
parameters
constraints
middleware
)
options
{
:executed-by
api/*current-user-id*
:context
context
:card-id
card-id
...
...
@@ -598,7 +599,8 @@
(
run-query-for-card
card-id
:parameters
(
json/parse-string
parameters
keyword
)
:constraints
nil
:context
(
dataset-api/export-format->context
export-format
)))))
:context
(
dataset-api/export-format->context
export-format
)
:middleware
{
:skip-results-metadata?
true
}))))
;;; ----------------------------------------------- Sharing is Caring ------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
src/metabase/api/dataset.clj
+
3
−
1
View file @
cfe0dd48
...
...
@@ -123,7 +123,9 @@
(
let
[
query
(
json/parse-string
query
keyword
)]
(
api/read-check
Database
(
:database
query
))
(
as-format
export-format
(
qp/process-query-and-save-execution!
(
dissoc
query
:constraints
)
(
qp/process-query-and-save-execution!
(
->
query
(
dissoc
:constraints
)
(
assoc
:middleware
{
:skip-results-metadata?
true
}))
{
:executed-by
api/*current-user-id*,
:context
(
export-format->context
export-format
)}))))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment