com.dtstack.dtcenter.loader.dto.SqlQueryDTO Maven / Gradle / Ivy
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.dtstack.dtcenter.loader.dto;
import com.dtstack.dtcenter.loader.dto.filter.Filter;
import com.dtstack.dtcenter.loader.enums.EsCommandType;
import com.dtstack.dtcenter.loader.enums.MatchType;
import lombok.Builder;
import lombok.Data;
import org.apache.commons.lang3.ArrayUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @company: www.dtstack.com
* @Author :Nanqi
* @Date :Created in 14:40 2020/2/26
* @Description:查询信息
*/
@Data
@Builder
public class SqlQueryDTO {
/**
* 查询 SQL
*/
private String sql;
/**
* schema/db
*/
private String schema;
/**
* 表名称
*/
private String tableName;
/**
* 表名称搜索
*/
private String tableNamePattern;
/**
* 表名称匹配类型
*/
private MatchType matchType;
/**
* 表类型 部分支持,建议只使用 view 这个字段
* {@link java.sql.DatabaseMetaData#getTableTypes()}
*/
private String[] tableTypes;
/**
* 字段名称
*/
private List columns;
/**
* 分区字段:值,用于hive分区预览数据、hbase自定义查询
*/
private Map partitionColumns;
/**
* 是否需要视图表,默认 false 不过滤
*/
private Boolean view;
/**
* 是否过滤分区字段,默认 false 不过滤
*/
private Boolean filterPartitionColumns;
/**
* 预览条数,默认100
*/
private Integer previewNum;
/**
* 预编译字段
* todo 修改executeQuery方法为支持预编译
* time :2020-08-04 15:49:00
*/
private List