This really depends on the web framework powering this. The short answer is that you'll visualize data using D3JS the same way you would if the data came from MySQL, or Postgres, etc. Your client will make API calls to your web server, which will in return make SQL calls to Impala,MySQL,Postgres,etc, and then send the data back to the client (JSON, XML, etc) so that it can be visualized. The client (D3JS) will typically never talk to the database (Impala) directly.

If you're writing your web server in Java, you'll want to look at JDBC. If you're writing it in C#/ASP.NET, or something that can talk ODBC, then you should use the Impala ODBC driver. If you want to use Python or Ruby, take a look out on Github...there's some libraries to help you out there too: