This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select format_datetime(current_timestamp, 'YYYY-MM-dd''T''HH:mm''Z''') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH | |
HEADER_ROWS AS ( | |
SELECT | |
col0 key | |
, col1 value | |
, "$path" file | |
FROM | |
"database"."orders" | |
WHERE (NOT (col0 LIKE 'PID_%')) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: A basic CloudFormation template for an RDS Aurora cluster. | |
Parameters: | |
DatabaseInstanceType: | |
Default: db.r3.large | |
AllowedValues: | |
- db.r3.large | |
- db.r3.xlarge | |
- db.r3.2xlarge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH CTE AS ( | |
SELECT | |
concat( | |
substr('20220416T070044.243Z', 1, 4), '-', | |
substr('20220416T070044.243Z', 5, 2), '-', | |
substr('20220416T070044.243Z', 7, 2), 'T', | |
substr('20220416T070044.243Z', 10, 2), ':', | |
substr('20220416T070044.243Z', 12, 2), ':', | |
substr('20220416T070044.243Z', 14) | |
) as ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from sqlalchemy.sql import text | |
_logger = logging.getLogger(__name__) | |
class ArchivableMixin: | |
"""Model which can be duplicated via one special materialized view""" |