일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- dataframe
- django
- matplotlib
- Kotlin
- Github
- Tkinter
- Excel
- hive
- PySpark
- list
- PostgreSQL
- gas
- SQL
- Mac
- numpy
- google apps script
- Java
- string
- Google Spreadsheet
- Google Excel
- Apache
- math
- Redshift
- c#
- PANDAS
- Python
- 파이썬
- array
- GIT
- Today
- Total
목록분류 전체보기 (847)
달나라 노트
show procedure syntax를 이용하면 procedure의 detail과 procedure가 생성될 때 사용된 코드를 볼 수 있습니다. show procedure schema.procedure_name(bigint, float, varchar); 출처https://docs.aws.amazon.com/ko_kr/redshift/latest/dg/r_SHOW_PROCEDURE.html SHOW PROCEDURE - Amazon RedshiftSHOW PROCEDURE 서명을 포함하여 제공된 저장 프로시저의 정의를 보여 줍니다. SHOW PROCEDURE의 출력을 사용하여 저장 프로시저를 다시 생성할 수 있습니다. 구문 SHOW PROCEDURE sp_name [( [ [ argname ] [ ..
procedure에 권한을 부여하는 것은 table에 권한을 부여하는 것과 비슷합니다. grant execute on procedure schema.procedure_name(bigint, varchar, float) to sample_user;grant all on procedure schema.procedure_name(bigint, varchar, float) to sample_user; 위처럼 grant (permission) on procedure (procedure) to (user) 의 형태로 권한 을 부여할 수 있습니다. 한 가지 주의할 점은 procedure는 동일한 schema, 동일한 procedure_name을 가지더라도 parameter가 다르거나 parameter의 data ty..
procedure 내에서 query를 실행하는 것도 가능합니다. create or replace procedure schema.procedure_name( f1 in bigint, f2 in float, f3 in varchar)language plpgsqlas $$ begin drop table if exists temp_table_1; create temp table temp_table_1 as select bt.* from schema.base_table as bt where bt.target_id = f1 ; drop table if exists schema..
procedure 내부에서 for syntax를 사용할 수 있습니다. create or replace procedure schema.procedure_name( f1 in bigint, f2 in float, f3 in varchar)language plpgsqlas $$ begin for i in 1..10 loop raise notice 'i = %', i; end loop; end;$$;-- Resulti = 1i = 2i = 3i = 4i = 5i = 6i = 7i = 8i = 9i = 10 가장 기본적인 for loop 형태는 위와 같습니다.1에서 10까지의 숫자를 대상으로 for loop를 실행합니다.주의할..