Skip to content

gdoniparthi/summerschool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clone the repo and follow the below manual steps to complete the setup

  1. Run the following docker command from the "summerschool" folder where there is docker-compose.yml file.
docker compose up -d
  1. Check the containers. Note down the Apache Drill container id.
docker ps
  1. Copy the client-jar files directly to the Drill container.
docker cp drill/client-jars/postgresql-42.6.0.jar  <CONTAINER_ID>:/opt/drill/jars/3rdparty
docker cp drill/client-jars/mongodb-driver-3.12.14.jar <CONTAINER_ID>:/opt/drill/jars/3rdparty
  1. Restart the drill container
docker restart <CONTAINER_ID>
  1. Once the Drill container is back online, open the UI @ "localhost:8047"

  2. Go to the "Storage" tab and enable both "mongo" and "rdbms" storage plugins. You would need the IP addresses of both Postgresql and Mongo containers. You can use following commands

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' summerschool-mongodb-1
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' summerschool-postgres-1

or 

docker inspect <CONTAINER_ID>
  1. Update the "mongo" plugin with the following. You can find the container IP address using "docker inspect <CONTAINER_ID>"
{
  "type": "mongo",
  "connection": "mongodb://<Mongo Container IP Address>:27017/",
  "pluginOptimizations": {
    "supportsProjectPushdown": true,
    "supportsFilterPushdown": true,
    "supportsAggregatePushdown": true,
    "supportsSortPushdown": true,
    "supportsUnionPushdown": true,
    "supportsLimitPushdown": true
  },
  "batchSize": 100,
  "enabled": true,
  "authMode": "SHARED_USER"
}
  1. Update the "rdbms" plugin with the following.
{
  "type": "jdbc",
  "enabled": "true",
  "driver": "org.postgresql.Driver",
  "url": "jdbc:postgresql://<Postgres Container IP address>:5432/",
  "username": "postgres",
  "password": "postgres"
}
  1. On the Drill UI, go to the Queries tab and execute the following test query.
select title, overview from rdbms.`movies` where title='Seabiscuit';
  1. Try the below Mongo test query. Yes, it is an SQL query!
select character_name, name, order_id from mongo.movies.`casting` where movie_id=4464 order by order_id;

About

RPTU summer school hands on repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages