Metabase添加impala驱动

参考:
https://www.metabase.com/docs...

驱动地址:
https://github.com/brenoae/me...

原文地址:https://segmentfault.com/a/11...
本文为docker版本

1.下载驱动文件存放本地路径/opt/metabase/plugins/
ImpalaJDBC41.jar
impala.metabase-driver.jar
赋予一下权限
chmod 777 ImpalaJDBC41.jar
chmod 777 impala.metabase-driver.jar

2.进入容器命令,查看路径后,使用cp复制命令

docker exec -it 容器ID /bin/bash
docker cp /opt/metabase/plugins/ImpalaJDBC41.jar metabase:plugins/
docker cp /opt/metabase/plugins/impala.metabase-driver.jar metabase:plugins/

3.重启容器
docker restart 容器ID

下面为官方教程:

Adding external dependencies or plugins
添加外部依赖项或插件

To add external dependency JAR files, such as the Oracle or Vertica JDBC drivers or 3rd-party Metabase drivers), you’ll need to:
要添加外部依赖 JAR 文件,例如 Oracle 或 Vertica JDBC 驱动程序或第 3 方元数据库驱动程序),您需要:

create a plugins directory in your host system, and
创建一个 plugins主机系统中的目录,以及

bind that directory so it’s available to Metabase as the path /plugins (using either --mount or -v/--volume).
绑定该目录,以便 Metabase 可以将其用作路径 /plugins(使用任一 --mount或者 -v/ --volume).

For example, if you have a directory named /path/to/plugins on your host system, you can make its contents available to Metabase using the --mount option as follows:
例如,如果您有一个名为 /path/to/plugins在您的主机系统上,您可以使用 --mount选项如下:
docker run -d -p 3000:3000 \
  --mount type=bind,source=/path/to/plugins,destination=/plugins \
  --name metabase metabase/metabase
    
Note that Metabase will use this directory to extract plugins bundled with the default Metabase distribution (such as drivers for various databases such as SQLite), thus it must be readable and writable by Docker.
请注意,Metabase 将使用此目录来提取与默认 Metabase 发行版捆绑在一起的插件(例如各种数据库的驱动程序,例如 SQLite),因此它必须是 Docker 可读可写的。

原文地址:https://segmentfault.com/a/11...

How to Install it
如何安装

Metabase will automatically make the Impala driver if it finds the driver JAR in the Metabase plugins directory when it starts up.
如果 Metabase 在启动时在 Metabase plugins 目录中找到驱动程序 JAR,它将自动制作 Impala 驱动程序。

Follow steps shown bellow to install the driver properly:
请按照以下步骤正确安装驱动程序:

Create the directory (if it's not already there)
Move the Impala metabase driver JAR you just downloaded into it ("impala.metabase-driver.jar")
Move the Impala JDBC driver JAR you just downloaded into it ("ImpalaJDBC41.jar")
Restart Metabase
创建目录(如果它还不存在)
将刚刚下载的 Impala 元数据库驱动程序 JAR 移动到其中(“impala.metabase-driver.jar”)
将刚刚下载的 Impala JDBC 驱动程序 JAR 移动到其中(“ImpalaJDBC41.jar”)
重启元数据库

By default, the plugins directory is called plugins, and lives in the same directory as the Metabase JAR.
默认情况下,插件目录称为 plugins, 并且与 Metabase JAR 位于同一目录中。

For example, if you're running Metabase from a directory called /app/, you should move the Impala driver JAR to /app/plugins/:
例如,如果您从名为 /app/,您应该将 Impala 驱动程序 JAR 移动到 /app/plugins/:

# example directory structure for running Metabase with Impala support
./metabase.jar
./plugins/impala.metabase-driver.jar
./plugins/ImpalaJDBC41.jar

你可能感兴趣的:(impalasqlbi)