How to use the datax-query.QueryModels.defaultQuery function in datax-query

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 / 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
        });
    }
};