dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[QUESTION] Should we need Beeline for hive connection?

Open KEN-LJQ opened this issue 6 years ago • 4 comments

Describe the question DS current use hive jdbc to execute hive sql, but it can not good fit these:

  1. Put multiple sql within a sql task
  2. Dynamic table name. Each data task, we use some temporary tables, those table name has a date argument, like tmp.tmp_table_xxxx_20191208, DS can't pass a argument to as tableName
  3. Argument as a part of string.

Which version of DolphinScheduler:

  • [1.1.0]

Additional context We plan to migrate our data task from Oozie to DS, and we use beeline before, but we meet those problem with hive task. We know jdbc is much common for different datasource, so Beeline may not necessary, any good solution or workaround is accepted

KEN-LJQ avatar Dec 09 '19 12:12 KEN-LJQ

can you use Beeline in shell task?

davidzollo avatar Dec 09 '19 14:12 davidzollo

you can use shell task to use beeline like beeline -u jdbc:hive2:xxx -n ${tenant_id}, but if you not set-n ${tenant_id} param the hive table will belong to user=anonymous not the workflow ${tenant_id}

Eights-Li avatar Dec 09 '19 14:12 Eights-Li

I believe invoke beeline in shell is a solution, but I think it’s not friendly for developers, since we need to put sql file on hdfs or DS resources manager, also we need to set a lot of hivevars within shell command if need to pass arguments. Current UI of sql task I think is friendly enough.

KEN-LJQ avatar Dec 09 '19 14:12 KEN-LJQ

This maybe not necessary, I open this issue just want to know is anyone else meet this problem and how they solve this.

KEN-LJQ avatar Dec 09 '19 14:12 KEN-LJQ