SQL

Setting up Oracle ODBC on macOS with ISQL

0) Install ISQL If you’re on macOS the easiest way to install isql is using homebrew brew install unixodbc. 1) Download drivers Download ODBC Package & Basic Package from here Create an oracle account if necessary 2) Prepare driver files cd Downloads unzip instantclient-basic-macos.x64-19.3.0.0.0dbru.zip unsip instantclient-odbc-macos.x64-19.3.0.0.0dbru.zip mkdir ~/lib mkdir -p /opt/oracle/ mv $(pwd)/instantclient_19_3 /opt/oracle/ ln -s /opt/oracle/instantclient_19_3/libclntsh.dylib.19.1 /opt/oracle/instantclient_19_3/libclntshcore.dylib.19.1 ~/lib 3) Update ODBC ini files update odbcinst.

Connecting to Google BigQuery with DBeaver

0) Install DBeaver You can find installation instructions here. Make sure to install version 5.2.2 or later. If you haven’t updated to 5.2.2 or later you may use this post as a guide for connecting to BigQuery. 1) Create a new service account Instructions & details for creating a new service account can be found on Google’s website Grant your desired BigQuery permissions to your new service account Download the service account key 2) Create a new connection In the menu bar navigate to Database > New Connection Select BigQuery & press next Fill in project with the name of your BigQuery Project Optional, add additional projects in the subsequent field Select service-based Fill in the name of the service account ex: bigquery-demo@project_name.

Exploring Complex Types in BigQuery

Introduction Google’s BigQuery has support for complex types (arrays & structs) which are relatively new in analytical databases. While the ideas and of arrays and structs aren’t unique to BigQuery some of the syntax and capabilities are unique. In this post I’ll be going over what I’ve found to be the most useful patterns and tricks. Arrays Put plainly an array is a series of values of the same type stored within a single value.

Connecting to Google BigQuery with DBeaver with JDBC Drivers

Update (2018-10-07) Shortly after this post DBeaver was updated with a native connector. Please see this post for a more up to date connection instructions if you have updated DBeaver to 5.2.2 or later. 0) Install DBeaver You can find installation instructions here 1) Download the latest drivers You can find the latest drivers on Google’s website 2) Create a folder to store the drivers mkdir ~/.dbeaver-drivers/bigquery/ 3) Extract driver jars and move to the folder we made earlier 4) Create a New Driver in DBeaver Navigate to Database > Driver Manager > New Add all the files from ~/.

Importing a CSV into a database using DBeaver Part 2

Forward This is a followup to my previous post. My previous post demonstrated how to import a CSV using Dbeaver’s database to database export & import feature. As of version 5.1.5 Dbeaver introduced a direct CSV option for importing CSVs. 0) Install DBeaver You can find installation instructions here 1) Connect to your target database 1.1) Navigate through your target database & schema and right click on your target table and select import table data

Importing a CSV into a database using DBeaver

Update: August 12, 2018 The following post demonstrates how to import CSVs using Dbeaver’s database to database export & import feature. If you are certain of the quality of your CSV & just want to import it quickly my subsequent post may be more useful. 0) Install DBeaver You can find installation instructions here 1) Create a folder to be used as your CSV Database mkdir ~/desktop/csvs Place the CSV you want to load into this folder

Connecting to Hive with DBeaver using Kerberos Authentication

0) Install DBeaver You can find installation instructions here 1) Download the latest drivers You can find the latest drivers on the Cloudera website 2) Create a folder to store the drivers mkdir ~/.dbeaver-drivers/cloudera-hive/ 3) Extract driver jars and move to the folder we made earlier 4) Create a New Driver in DBeaver Navigate to Database > Driver Manager > New Add all the files from ~/.dbeaver-drivers/cloudera-hive/ Driver name: Hive-Cloudera (for labeling only) Class name: com.

Installing DBeaver on a Mac

0) What is DBeaver? Quite simply DBeaver is the best multi-database SQL IDE that I’ve used. It supports every JDBC connection that I’ve thrown at it and has advanced features for some of the more popular databases such as Mysql & Postgres. Many thanks to serge-rider for creating such an awesome tool. 1) Install Java First we need to install java which can be easily by running the following command in terminal (homebrew required):