apache-drill

Apache Drill: Write general-purpose array_agg UDF

烈酒焚心 提交于 2020-08-10 19:18:57
问题 I would like to create an array_agg UDF for Apache Drill to be able to aggregate all values of a group to a list of values. This should work with any major types (required, optional) and minor types (varchar, dict, map, int, etc.) However, I get the impression that Apache Drill's UDF API does not really make use of inheritance and generics. Each type has its own writer and handler, and they cannot be abstracted to handle any type. E.g., the ValueHolder interface seems to be purely cosmetic

Connect Apache Drill to Google Cloud

╄→尐↘猪︶ㄣ 提交于 2020-08-09 09:01:44
问题 How do I connect google cloud buckets to Apache Drill. I want to connect Apache Drill to google cloud storage buckets and fetch data from the file files stored in those buckets. I can specify access id and key in core-site.xml in order to connect to AWS. Is there a similar way to connect drill to google cloud. 回答1: I found the answer here useful: Apache Drill using Google Cloud Storage On Google Cloud Dataproc you can set it up with an initialization action as in the answer above. There's

Unable to query PostgreSQL with Apache Drill 1.11, VALIDATION ERROR

时光怂恿深爱的人放手 提交于 2020-06-29 03:58:47
问题 I managed to connect Drill and PostgreSQL but even for a simple command like show tables I am receiving: org.apache.drill.common.exceptions.UserException: VALIDATION ERROR: Multiple entries with same key: campaign_items=JdbcTable {campaign_items} and campaign_items=JdbcTable {campaign_items} I have two schemas public and fdw which contains the same table name campaign_items . How can I force Drill to use the fully qualified name to avoid confusion? Any other suggestions? 回答1: To use show

apache drill “no current connection” error

有些话、适合烂在心里 提交于 2020-01-25 07:36:49
问题 I am using the most recent version of drill on windows machines in embedded mode. However, I always get "no current connection" errors when sending any queries. Also, the web server localhost:8047 does not work either. Here is what I see when I try to start drill. I have tried both Java JDK 8 and 9, on two separate windows machines and got the same error. I searched about this matter but could not get any workarounds so far. Any fix to this? Thanks a lot!! 回答1: Problem solved by setting JAVA

In Apache drill, query to find the Nth occurrence of a character in a string

早过忘川 提交于 2020-01-06 04:35:25
问题 I want the position of '/' from the string where '/' has repeated multiple times and the length of the string varies. In Apache drill, the INSTR() will not work to find the Nth occurrence of a character in a string. i.e INSTR('/This/looks/like/homework', '/',1,3) to get the output as 12, this query will not work in Apache drill. I want the position of '/' on Nth Occurrence in Apache drill. Please help me with the solution. 回答1: 0: jdbc:drill:> SELECT STRPOS(a, REGEXP_REPLACE(a, '^\/.*?\/.*?\/

How to start drillbit locally in distributed mode?

我是研究僧i 提交于 2020-01-02 16:53:40
问题 I downloaded Apache Drill v1.8, edited the conf/drill-override.conf to have the following changes: drill.exec: { cluster-id: "drillbits1", zk.connect: "10.178.23.140:2181,10.178.23.140:2182,10.178.23.140:2183,10.178.23.140:2184" } ..zookeeper cluster is effectively consisted of 4 Zookeeper instances started on the same, one machine, I'm trying to start Drill on. (i.e. I'm only using one machine for Apache Drill and Zookeeper's cluster, the machine's IP is 10.178.23.140 ) So I keep getting

Apache Drill connection through Java

泪湿孤枕 提交于 2020-01-02 03:58:10
问题 Throughout the Wiki of Apache Drill, I could only see queries running via SqlLine client. Is there any programmatical way to run queries in Drill other than the REST API? Any samples or pointers? Or is it as equivalent as using JDBC driver to run SQL queries? 回答1: You can use the Drill JDBC driver, which is documented here: http://drill.apache.org/docs/using-the-jdbc-driver/ Note that if you're building your Java program with Maven, you'll need to install the Drill dependencies locally: mvn

Creating Storage Plugin throught through C# code in Apache Drill [duplicate]

坚强是说给别人听的谎言 提交于 2019-12-25 18:21:01
问题 This question already has answers here : How to create connection in storage plugin of Apache Drill Programmatically in c# (2 answers) Closed 3 years ago . I want to create Storage Plugin through C#(.NET) code, when Drill is install in some other system(not in local).? Is it Possible?? If yes then how.? 回答1: I found out some solution for that: var request = (HttpWebRequest)WebRequest.Create(url); var postData = "name=" + name + "&config=" + config; var data = Encoding.ASCII.GetBytes(postData)

SQL Server Storage Plugin not Working

馋奶兔 提交于 2019-12-24 16:56:03
问题 I am trying to get the SQL Server Plugin working in Apache Drill as outlined here but it seems to be throwing the following error: error (unable to create/update storage) My storage config looks like this: { type: "jdbc", enabled: true, driver: "com.microsoft.sqlserver.jdbc.SQLServerDriver", url:"jdbc:sqlserver://10.60.68.145;databaseName=Demo", username:"ApacheDrill", password:"Passw0rd" } I have tried copying both sqljdbc41.jar (from sqljdbc_4.1.5605.100_enu.tar.gz) and sqljdbc42.jar (from

SQL Server Storage Plugin not Working

拥有回忆 提交于 2019-12-24 16:54:29
问题 I am trying to get the SQL Server Plugin working in Apache Drill as outlined here but it seems to be throwing the following error: error (unable to create/update storage) My storage config looks like this: { type: "jdbc", enabled: true, driver: "com.microsoft.sqlserver.jdbc.SQLServerDriver", url:"jdbc:sqlserver://10.60.68.145;databaseName=Demo", username:"ApacheDrill", password:"Passw0rd" } I have tried copying both sqljdbc41.jar (from sqljdbc_4.1.5605.100_enu.tar.gz) and sqljdbc42.jar (from