Skip to content

Commit

Permalink
Filtered tables in pg_internal from v_generate_unload_copy_cmd.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopherson committed Mar 14, 2016
1 parent 10abea7 commit e01d5f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AdminViews/v_generate_unload_copy_cmd.sql
Expand Up @@ -23,7 +23,8 @@ FROM
,'unload' AS cmd_type
,'UNLOAD (''SELECT * FROM ' + schemaname + '.' + tablename + ' --WHERE audit_id > ___auditid___'') TO ''s3://__bucketname__/' + TO_CHAR(GETDATE(), 'YYYYMMDD_HH24MISSMS') + '/' + schemaname + '.' + tablename + '-'' CREDENTIALS ''__creds_here__'' GZIP DELIMITER ''\\t'';' AS dml
FROM
pg_tables
pg_tables
WHERE schemaname NOT IN ('pg_internal')
UNION ALL
SELECT
schemaname
Expand All @@ -33,5 +34,6 @@ FROM
FROM
pg_tables
)
WHERE schemaname NOT IN ('pg_internal')
ORDER BY 3 DESC,1,2
;

0 comments on commit e01d5f4

Please sign in to comment.