嵌入式分析 SDK API
    正在准备搜索索引...

    接口 CreateQuestionProps

    interface CreateQuestionProps {
        entityTypes?: EmbeddingEntityType[];
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        targetCollection?: SdkCollectionId;
        withDownloads?: boolean;
    }
    索引

    属性

    entityTypes?: EmbeddingEntityType[]

    一个数组,用于指定数据选择器中可用的实体类型

    initialSqlParameters?: SqlParameterValues

    SQL 参数的初始值。

    isSaveEnabled?: boolean

    是否显示保存按钮。

    ?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => Promise<void>

    一个在保存前触发的回调函数。仅当 `isSaveEnabled = true` 时相关。

    onRun?: (question: undefined | MetabaseQuestion) => void

    一个回调函数,当问题更新时触发,包括当用户在问题编辑器中点击 `可视化` 按钮时

    onSave?: (
        question: undefined | MetabaseQuestion,
        context: { isNewQuestion: boolean },
    ) => void

    一个回调函数,当用户保存问题时触发。仅当 `isSaveEnabled = true` 时相关。

    targetCollection?: SdkCollectionId

    保存问题的集合。这将从保存模态框中隐藏集合选择器。仅适用于交互式问题。

    withDownloads?: boolean

    启用在交互式问题中下载结果的功能。

    © . All rights reserved.