Exasol 커넥터
Exasol 커넥터 (Exasol connector)
Exasol 커넥터는 Exasol 데이터베이스를 질의할 수 있게 해 줘요.
출처: 문서
본문
요구사항 (Requirements)
Exasol에 연결하려면 다음이 필요해요:
- Exasol 데이터베이스 8.34.0 이상.
- Trino 코디네이터와 워커에서 Exasol로 네트워크 접근. 기본 포트는 8563이에요.
설정 (Configuration)
Exasol 커넥터를 example 카탈로그로 구성하려면 etc/catalog에 example.properties 파일을 만드세요. 파일에 다음 연결 속성을 넣으세요:
connector.name=exasol
connection-url=jdbc:exa:exasol.example.com:8563
connection-user=user
connection-password=secret
대소문자를 구분하는 이름을 대소문자 무시 매핑으로 처리하도록 설정할 수 있어요. 구성 파일에서 스키마·테이블 이름 매핑을 지정하세요:
{
"schemas": [
{
"remoteSchema": "CaseSensitiveName",
"mapping": "case_insensitive_1"
},
{
"remoteSchema": "cASEsENSITIVEnAME",
"mapping": "case_insensitive_2"
}],
"tables": [
{
"remoteSchema": "CaseSensitiveName",
"remoteTable": "tablex",
"mapping": "table_1"
},
{
"remoteSchema": "CaseSensitiveName",
"remoteTable": "TABLEX",
"mapping": "table_2"
}]
}
구성 파일을 주기적으로 다시 읽게 하려면 다음 속성을 쓰세요:
case-insensitive-name-matching.config-file.refresh-period=30s
메타데이터 캐시를 비우고 싶을 때:
USE example.example_schema;
CALL system.flush_metadata_cache();
Exasol에 대해 SQL로 명령을 실행할 수 있어요:
USE example.example_schema;
CALL system.execute(query => 'ALTER TABLE your_table ALTER COLUMN your_column DROP DEFAULT');
테이블 함수로 결과를 받아올 수 있어요:
SELECT
*
FROM
TABLE(
example.system.query(
query => 'SELECT
*
FROM
tpch.nation'
)
);
윈도우 함수 독립형 문법 사용 예시:
SELECT
*
FROM
TABLE(
example.system.query(
query => 'SELECT
id, department, hire_date, starting_salary,
AVG(starting_salary) OVER w2 AVG,
MIN(starting_salary) OVER w2 MIN_STARTING_SALARY,
MAX(starting_salary) OVER (w1 ORDER BY hire_date)
FROM employee_table
WINDOW w1 as (PARTITION BY department), w2 as (w1 ORDER BY hire_date)
ORDER BY department, hire_date'
)
);
더 알아보기 (Learn more)
다른 관계형 데이터베이스 커넥터가 궁금하다면 PostgreSQL 커넥터 문서를 이어서 읽어 보세요.