VERTICA/09. SQL
-
flex tableVERTICA/09. SQL 2018. 10. 1. 18:18
-- 형식이 없는 flex table 생성create flex table test.temp_ytkim_test(); --초기화truncate table test.temp_ytkim_test; -- 데이터 적재copy test.temp_ytkim_test from local 'd:\json\ga_tes*.json' PARSER fjsonparser();copy test.temp_ytkim_test from local 'd:\json\ga_test*.json' PARSER fjsonparser(flatten_maps = true, flatten_arrays=true);copy test.temp_ytkim_test from local 'd:\json\ga*.json' PARSER fjsonparser(flat..
-
정규식VERTICA/09. SQL 2017. 9. 14. 11:18
일반 개발자 블로그에서 퍼온것이긴 한데 버티카에서도 거의 동일하게 사용가능 .버티카 다큐먼트에서는 http://perldoc.perl.org/perlre.html 여기참조하라고 하네.. 한두가지 버티카로 변환한 예 한글만 가능 : [ 가나다라 ... ] 주의 : ㄱㄴㄷ... 형식으로는 입력 불가능 , 띄어쓰기 불가능기본 정규식 : /^[가-힣]+$/ 버티카 : regexp_like(컬럼 혹은 문자열 , '^[가-힣]+$') 숫자만 가능 : [ 0 ~ 9 ] 주의 : 띄어쓰기 불가능기본 정규식 : /^[0-9]+$/ 버티카 : regexp_like(컬럼 혹은 문자열 , '^[0-9]+$') 여기부터 퍼온내용 출처는 맨아래 기술 전자우편 주소: /^[a-z0-9_+.-]+@([a-z0-9-]+\.)+[a-z..
-
EXPORT TO VERTICAVERTICA/09. SQL 2016. 12. 20. 12:35
오랜만에 글을쓰는듯.. EXPORT TO VERTICA : 버티카(소스) -> 버티카(타겟)간 데이터 이관 시에 사용한다(반대는 copy from) 문법 은 아래와 같다. EXPORT TO VERTICA database.[dest-schema.]dest-table ... [(dest-column [,dest-column2,...])] ... { AS SELECT select-expression ... | FROM [source-schema.]source-table ... [(source-column [,source-column2,...])]}; 대략적인 수행방법은 아래와 같다. /opt/vertica/bin/vsql -v AUTOCOMMIT=on -c "connect to VERTICA 접속할db명 US..