Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const restartSparkJob = name =>
servicePostApi(Constants.serviceRouteApi, Constants.serviceApplication, Constants.services.flow, 'job/restart', name);
export const executeQuery = (queryMetadata, selectedQuery, kernelId) =>
servicePostApi(Constants.serviceRouteApi, Constants.serviceApplication, Constants.services.interactiveQuery, 'kernel/executequery', {
name: queryMetadata.name,
displayName: queryMetadata.displayName,
query: selectedQuery,
kernelId: kernelId,
rules: queryMetadata.rules,
outputTemplates: queryMetadata.outputTemplates
});
export const getInputSchema = flow =>
servicePostApi(Constants.serviceRouteApi, Constants.serviceApplication, Constants.services.schemaInference, 'inputdata/inferschema', {
name: flow.name,
displayName: flow.displayName,
userName: flow.owner,
eventhubConnectionString: flow.input.properties.inputEventhubConnection,
inputSubscriptionId: flow.input.properties.inputSubscriptionId,
inputResourceGroup: flow.input.properties.inputResourceGroup,
eventHubNames: flow.input.properties.inputEventhubName,
inputType: flow.input.type,
seconds: flow.samplingInputDuration
});
export const saveFlow = (config, query) =>
servicePostApi(Constants.serviceRouteApi, Constants.serviceApplication, Constants.services.flow, 'flow/save', config, query);
export const deleteAllKernels = flowName =>
servicePostApi(Constants.serviceRouteApi, Constants.serviceApplication, Constants.services.interactiveQuery, 'kernels/deleteall', flowName);
export const getTableSchemas = queryMetadata =>
servicePostApi(Constants.serviceRouteApi, Constants.serviceApplication, Constants.services.flow, 'userqueries/schema', {
name: queryMetadata.name,
displayName: queryMetadata.displayName,
query: queryMetadata.query,
inputSchema: queryMetadata.inputSchema,
rules: queryMetadata.rules,
outputTemplates: queryMetadata.outputTemplates
});