mirror of
https://github.com/apache/superset.git
synced 2026-04-25 19:14:27 +00:00
feat: the samples endpoint supports filters and pagination (#20683)
This commit is contained in:
@@ -602,10 +602,11 @@ export const getDatasourceSamples = async (
|
||||
datasourceType,
|
||||
datasourceId,
|
||||
force,
|
||||
jsonPayload,
|
||||
) => {
|
||||
const endpoint = `/api/v1/explore/samples?force=${force}&datasource_type=${datasourceType}&datasource_id=${datasourceId}`;
|
||||
const endpoint = `/datasource/samples?force=${force}&datasource_type=${datasourceType}&datasource_id=${datasourceId}`;
|
||||
try {
|
||||
const response = await SupersetClient.get({ endpoint });
|
||||
const response = await SupersetClient.post({ endpoint, jsonPayload });
|
||||
return response.json.result;
|
||||
} catch (err) {
|
||||
const clientError = await getClientErrorObject(err);
|
||||
|
||||
Reference in New Issue
Block a user