def construct_ingest_query(
            self, datasource, static_path, ts_dim, columns, metric_spec,
            intervals, num_shards, hadoop_dependency_coordinates=None):
        metric_names = [
            m['fieldName'] for m in metric_spec if m['type'] != 'count']
        dimensions = [c for c in columns if c not in metric_names and c != ts_dim]
        ingest_query_dict = {
            "type": "index_hadoop",
            "spec": {
                "dataSchema": {
                    "metricsSpec": metric_spec,
                    "granularitySpec": {
                        "queryGranularity": "NONE",
                        "intervals": intervals,
                        "type": "uniform",
                        "segmentGranularity": "DAY",
                    },
                    "parser": {
                        "type": "string",
                        "parseSpec": {
                            "columns": columns,
                            "dimensionsSpec": {
                                "dimensionExclusions": [],
                                "dimensions": dimensions,  # list of names
                                "spatialDimensions": []
                            },
                            "timestampSpec": {
                                "column": ts_dim,
                                "format": "auto"
                            },
                            "format": "tsv"
                        }
                    },
                    "dataSource": datasource
                },
                "tuningConfig": {
                    "type": "hadoop",
                    "jobProperties": {
                        "mapreduce.job.user.classpath.first": "false",
                        "mapreduce.map.output.compress": "false",
                        "mapreduce.output.fileoutputformat.compress": "false",
                    },
                    "partitionsSpec" : {
                        "type" : "hashed",
                        "targetPartitionSize" : -1,
                        "numShards" : num_shards,
                    },
                },
                "ioConfig": {
                    "inputSpec": {
                        "paths": static_path,
                        "type": "static"
                    },
                    "type": "hadoop"
                }
            }
        }
        if hadoop_dependency_coordinates:
            ingest_query_dict[
                'hadoopDependencyCoordinates'] = hadoop_dependency_coordinates

        return json.dumps(ingest_query_dict, indent=4)
Builds an ingest query for an HDFS TSV load.
dataset/ETHPy150Open airbnb/airflow/airflow/hooks/druid_hook.py/DruidHook.construct_ingest_query