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
69405c9e
Commit
69405c9e
authored
7 years ago
by
Simon Belak
Browse files
Options
Downloads
Patches
Plain Diff
Remove unneeded api endpoints
parent
9098c38e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/api/x_ray.clj
+0
-49
0 additions, 49 deletions
src/metabase/api/x_ray.clj
with
0 additions
and
49 deletions
src/metabase/api/x_ray.clj
+
0
−
49
View file @
69405c9e
...
...
@@ -46,14 +46,6 @@
{
:job-id
(
async/compute
#
(
fe/x-ray
(
fe/compare-features
{
:max-cost
max-cost
}
model1
model2
)))})
(
defn-
compare-filtered-field
[
max-cost
model1
model2
field
]
{
:job-id
(
async/compute
#
(
let
[{
:keys
[
comparison
constituents
]}
(
compare
max-cost
model1
model2
)]
{
:comparison
(
->
comparison
(
get
field
))
:top-contributors
(
->
comparison
(
get
field
)
:top-contributors
)
:constituents
constituents
}))})
(
api/defendpoint
GET
"/field/:id"
"Get x-ray of field."
[
id
max_query_cost
max_computation_cost
]
...
...
@@ -157,39 +149,6 @@
(
api/read-check
Segment
segment-id
)
(
api/read-check
Table
table-id
)))
(
api/defendpoint
GET
"/compare/segments/:segment1-id/:segment2-id/field/:field"
"Get comparison x-ray of field named `field` in segments with IDs
`segment1-id` and `segment2-id`."
[
segment1-id
segment2-id
field
max_query_cost
max_computation_cost
]
{
max_query_cost
MaxQueryCost
max_computation_cost
MaxComputationCost
}
(
compare-filtered-field
(
max-cost
max_query_cost
max_computation_cost
)
(
api/read-check
Segment
segment1-id
)
(
api/read-check
Segment
segment2-id
)
field
))
(
api/defendpoint
GET
"/compare/table/:table-id/segment/:segment-id/field/:field"
"Get comparison x-ray for field named `field` in table with ID
`table-id` and segment with ID `segment-id`."
[
table-id
segment-id
field
max_query_cost
max_computation_cost
]
{
max_query_cost
MaxQueryCost
max_computation_cost
MaxComputationCost
}
(
compare-filtered-field
(
max-cost
max_query_cost
max_computation_cost
)
(
api/read-check
Table
table-id
)
(
api/read-check
Segment
segment-id
)
field
))
(
api/defendpoint
GET
"/compare/segment/:segment-id/table/:table-id/field/:field"
"Get comparison x-ray for field named `field` in table with ID
`table-id` and segment with ID `segment-id`."
[
segment-id
table-id
field
max_query_cost
max_computation_cost
]
{
max_query_cost
MaxQueryCost
max_computation_cost
MaxComputationCost
}
(
compare-filtered-field
(
max-cost
max_query_cost
max_computation_cost
)
(
api/read-check
Segment
segment-id
)
(
api/read-check
Table
table-id
)
field
))
(
api/defendpoint
POST
"/compare/card/:id/query"
"Get comparison x-ray of card and ad-hoc query."
[
id
max_query_cost
max_computation_cost
:as
{
query
:body
}]
...
...
@@ -217,12 +176,4 @@
(
api/read-check
Segment
id
)
(
adhoc-query
query
)))
(
api/defendpoint
GET
"/compare/valid-pairs"
"Get a list of model pairs that can be compared."
[]
[[
"field"
"field"
]
[
"segment"
"segment"
]
[
"table"
"table"
]
[
"segment"
"table"
]])
(
api/define-routes
)
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