Big Data – Impala – How do I get to my data?

This is my speech at DOAG 2015.

I documented my 1. steps with Impala. Showing how to get data into Hadoop and Impala. And very important how to get it out again.

DOAG_Big_Data_Impala_v2

 

Advertisements

Toad & SQL Developer – copying data including column headers in data grid

If you want to copy the column header in the data grid then do the folloing

in Toad:

1. select the data you want to copy
2. press CTRL+INSERT

in SQL Developer

1. select the data you want to copy
2. press CTRL+SHIFT+INSERT

This works with parts of the columns too.

Literals: Alternative to single quote to start/end a string

As all know I can use single quotes to start/end a string in SQL and PL/SQL.

SELECT 'my string' AS a
  FROM dual;

A
---------
my string

When we have single quotes in a string we need an escape character. In Oracle this is another single quote. That looks like this.

SELECT 'my string with two single quotes for one '' ' AS a
  FROM dual;

A
-------------------------------------------
my string with two single quotes for one '

Complex strings can be difficult to handle this way. But Oracle provides another option.

SELECT q'[my string]' AS a
  FROM dual;

A
---------
my string

This way you can have as many single quotes in the string as you wish.
There are other options besides [] – {}, ().

SELECT q'{my 1' 2'' 3''' 4'''' string}' AS a
  FROM dual;

A
---------------------------
my 1' 2'' 3''' 4'''' string

I hope this helps.

Oracle Documentation 12c – Literals