How to use datax-query - 10 common examples

To help you get started, we’ve selected a few datax-query examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / flowReducer.js View on Github external
// *********************************************************************
import * as Actions from './flowActions';
import * as Models from './flowModels';
import { QueryModels, QueryActions } from 'datax-query';

const INITIAL_FLOW_STATE = {
    // Flow Config
    name: '',
    flowId: '',
    displayName: Models.getDefaultName(),
    owner: '',
    databricksToken: '',
    input: Models.defaultInput,
    referenceData: [],
    functions: [],
    query: QueryModels.defaultQuery,
    scale: {
        jobNumExecutors: '4',
        jobExecutorMemory: '1000',
        jobDatabricksAutoScale: true,
        jobDatabricksMinWorkers: '1',
        jobDatabricksMaxWorkers: '8'
    },
    outputs: [Models.getMetricSinker()],
    outputTemplates: [],
    rules: [],

    batchInputs: [Models.getDefaultBatchInputSettings()],
    batchList: [],

    // State
    isNew: false,
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / components / flowDefinitionPanel.jsx View on Github external
outputs: Selectors.getFlowOutputs(state),
    outputTemplates: Selectors.getFlowOutputTemplates(state),
    rules: Selectors.getFlowRules(state),

    // State
    selectedBatchIndex: Selectors.getSelectedBatchIndex(state),

    selectedReferenceDataIndex: Selectors.getSelectedReferenceDataIndex(state),
    selectedFunctionIndex: Selectors.getSelectedFunctionIndex(state),
    selectedSinkerIndex: Selectors.getSelectedSinkerIndex(state),
    selectedOutputTemplateIndex: Selectors.getSelectedOutputTemplateIndex(state),
    selectedRuleIndex: Selectors.getSelectedRuleIndex(state),
    isTestQueryOutputPanelVisible: LayoutSelectors.getTestQueryOutputPanelVisibility(state),
    kernelId: KernelSelectors.getKernelId(state),
    kernelVersion: KernelSelectors.getKernelVersion(state),
    fetchingKernel: KernelSelectors.getFetchingKernel(state),
    errorMessage: Selectors.getErrorMessage(state),
    warningMessage: Selectors.getWarningMessage(state),
    enableLocalOneBox: Selectors.getEnableLocalOneBox(state),

    // Validation
    infoValidated: Selectors.validateFlowInfo(state),
    inputValidated: Selectors.validateFlowInput(state),
    referenceDataValidated: Selectors.validateFlowReferenceData(state),
    functionsValidated: Selectors.validateFlowFunctions(state),
    scaleValidated: Selectors.validateFlowScale(state),
    outputsValidated: Selectors.validateFlowOutputs(state),
    rulesValidated: Selectors.validateFlowRules(state),
    flowValidated: Selectors.validateFlow(state),
    queryValidated: QuerySelectors.validateQueryTab(state),
    scheduleValidated: Selectors.validateFlowSchedule(state)
});
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / components / flowDefinitionPanel.jsx View on Github external
isQueryDirty: QuerySelectors.getQueryDirty(state),
    scale: Selectors.getFlowScale(state),
    outputs: Selectors.getFlowOutputs(state),
    outputTemplates: Selectors.getFlowOutputTemplates(state),
    rules: Selectors.getFlowRules(state),

    // State
    selectedBatchIndex: Selectors.getSelectedBatchIndex(state),

    selectedReferenceDataIndex: Selectors.getSelectedReferenceDataIndex(state),
    selectedFunctionIndex: Selectors.getSelectedFunctionIndex(state),
    selectedSinkerIndex: Selectors.getSelectedSinkerIndex(state),
    selectedOutputTemplateIndex: Selectors.getSelectedOutputTemplateIndex(state),
    selectedRuleIndex: Selectors.getSelectedRuleIndex(state),
    isTestQueryOutputPanelVisible: LayoutSelectors.getTestQueryOutputPanelVisibility(state),
    kernelId: KernelSelectors.getKernelId(state),
    kernelVersion: KernelSelectors.getKernelVersion(state),
    fetchingKernel: KernelSelectors.getFetchingKernel(state),
    errorMessage: Selectors.getErrorMessage(state),
    warningMessage: Selectors.getWarningMessage(state),
    enableLocalOneBox: Selectors.getEnableLocalOneBox(state),

    // Validation
    infoValidated: Selectors.validateFlowInfo(state),
    inputValidated: Selectors.validateFlowInput(state),
    referenceDataValidated: Selectors.validateFlowReferenceData(state),
    functionsValidated: Selectors.validateFlowFunctions(state),
    scaleValidated: Selectors.validateFlowScale(state),
    outputsValidated: Selectors.validateFlowOutputs(state),
    rulesValidated: Selectors.validateFlowRules(state),
    flowValidated: Selectors.validateFlow(state),
    queryValidated: QuerySelectors.validateQueryTab(state),
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / components / flowDefinitionPanel.jsx View on Github external
scale: Selectors.getFlowScale(state),
    outputs: Selectors.getFlowOutputs(state),
    outputTemplates: Selectors.getFlowOutputTemplates(state),
    rules: Selectors.getFlowRules(state),

    // State
    selectedBatchIndex: Selectors.getSelectedBatchIndex(state),

    selectedReferenceDataIndex: Selectors.getSelectedReferenceDataIndex(state),
    selectedFunctionIndex: Selectors.getSelectedFunctionIndex(state),
    selectedSinkerIndex: Selectors.getSelectedSinkerIndex(state),
    selectedOutputTemplateIndex: Selectors.getSelectedOutputTemplateIndex(state),
    selectedRuleIndex: Selectors.getSelectedRuleIndex(state),
    isTestQueryOutputPanelVisible: LayoutSelectors.getTestQueryOutputPanelVisibility(state),
    kernelId: KernelSelectors.getKernelId(state),
    kernelVersion: KernelSelectors.getKernelVersion(state),
    fetchingKernel: KernelSelectors.getFetchingKernel(state),
    errorMessage: Selectors.getErrorMessage(state),
    warningMessage: Selectors.getWarningMessage(state),
    enableLocalOneBox: Selectors.getEnableLocalOneBox(state),

    // Validation
    infoValidated: Selectors.validateFlowInfo(state),
    inputValidated: Selectors.validateFlowInput(state),
    referenceDataValidated: Selectors.validateFlowReferenceData(state),
    functionsValidated: Selectors.validateFlowFunctions(state),
    scaleValidated: Selectors.validateFlowScale(state),
    outputsValidated: Selectors.validateFlowOutputs(state),
    rulesValidated: Selectors.validateFlowRules(state),
    flowValidated: Selectors.validateFlow(state),
    queryValidated: QuerySelectors.validateQueryTab(state),
    scheduleValidated: Selectors.validateFlowSchedule(state)
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / components / flowDefinitionPanel.jsx View on Github external
query: QuerySelectors.getQueryContent(state),
    isQueryDirty: QuerySelectors.getQueryDirty(state),
    scale: Selectors.getFlowScale(state),
    outputs: Selectors.getFlowOutputs(state),
    outputTemplates: Selectors.getFlowOutputTemplates(state),
    rules: Selectors.getFlowRules(state),

    // State
    selectedBatchIndex: Selectors.getSelectedBatchIndex(state),

    selectedReferenceDataIndex: Selectors.getSelectedReferenceDataIndex(state),
    selectedFunctionIndex: Selectors.getSelectedFunctionIndex(state),
    selectedSinkerIndex: Selectors.getSelectedSinkerIndex(state),
    selectedOutputTemplateIndex: Selectors.getSelectedOutputTemplateIndex(state),
    selectedRuleIndex: Selectors.getSelectedRuleIndex(state),
    isTestQueryOutputPanelVisible: LayoutSelectors.getTestQueryOutputPanelVisibility(state),
    kernelId: KernelSelectors.getKernelId(state),
    kernelVersion: KernelSelectors.getKernelVersion(state),
    fetchingKernel: KernelSelectors.getFetchingKernel(state),
    errorMessage: Selectors.getErrorMessage(state),
    warningMessage: Selectors.getWarningMessage(state),
    enableLocalOneBox: Selectors.getEnableLocalOneBox(state),

    // Validation
    infoValidated: Selectors.validateFlowInfo(state),
    inputValidated: Selectors.validateFlowInput(state),
    referenceDataValidated: Selectors.validateFlowReferenceData(state),
    functionsValidated: Selectors.validateFlowFunctions(state),
    scaleValidated: Selectors.validateFlowScale(state),
    outputsValidated: Selectors.validateFlowOutputs(state),
    rulesValidated: Selectors.validateFlowRules(state),
    flowValidated: Selectors.validateFlow(state),
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / flowActions.js View on Github external
.then(flow => {
                dispatch(QueryActions.initQuery(flow.payload.query));
            })
            .catch(error => {
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / flowActions.js View on Github external
return dispatch({
                    type: FLOW_INIT,
                    payload: flow
                });
            })
            .then(flow => {
                dispatch(QueryActions.initQuery(flow.payload.query));
            })
            .catch(error => {
                const message = getApiErrorMessage(error);
                updateErrorMessage(dispatch, message);
                return Q.reject({ error: true, message: message });
            });
    } else {
        const owner = UserSelectors.getUserAlias(getState());
        dispatch(QueryActions.initQuery(QueryModels.defaultQuery));
        return dispatch({
            type: FLOW_NEW,
            payload: owner
        });
    }
};
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / components / flowDefinitionPanel.jsx View on Github external
getKernel() {
        if (
            this.props.input.properties.inputSchemaFile !== Models.defaultInput.properties.inputSchemaFile &&
            this.props.input.properties.inputSchemaFile !== '{}'
        ) {
            const version = this.props.kernelVersion + 1;
            this.props.onUpdateKernelVersion(version);
            this.props.onGetKernel(
                Helpers.convertFlowToQueryMetadata(this.props.flow, this.props.query),
                version,
                QueryActions.updateErrorMessage
            );
        }
    }
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / components / flowDefinitionPanel.jsx View on Github external
refreshKernel(kernelId) {
        const version = this.props.kernelVersion + 1;
        this.props.onUpdateKernelVersion(version);
        this.props.onRefreshKernel(
            Helpers.convertFlowToQueryMetadata(this.props.flow, this.props.query),
            kernelId,
            version,
            QueryActions.updateErrorMessage
        );
    }
github microsoft / data-accelerator / Website / Packages / datax-pipeline / src / modules / flowDefinition / components / flowDefinitionPanel.jsx View on Github external
    onDeleteAllKernels: updateErrorMessage => dispatch(KernelActions.deleteAllKernels(updateErrorMessage)),