wooden-football-7175
02/15/2022, 9:38 PMwooden-football-7175
02/15/2022, 9:40 PM"ConfigurationError: redshift-usage is disabled; try running: pip install 'acryl-datahub[redshift-usage]'\n",wooden-football-7175
02/15/2022, 9:41 PMdatahub docker quickstartwooden-football-7175
02/15/2022, 9:42 PMdatahub-rest, redshift, glue, redshift-usagewooden-football-7175
02/15/2022, 9:43 PMrequirements.txt but also have the same error.wooden-football-7175
02/15/2022, 9:43 PMwooden-football-7175
02/15/2022, 9:44 PMbig-carpet-38439
02/16/2022, 1:46 AMbig-carpet-38439
02/16/2022, 1:49 AMwooden-football-7175
02/16/2022, 11:59 AMwooden-football-7175
02/16/2022, 12:00 PMredshift-usagebig-carpet-38439
02/16/2022, 4:55 PMbig-carpet-38439
02/16/2022, 4:55 PMbig-carpet-38439
02/16/2022, 4:55 PMwooden-football-7175
02/16/2022, 5:06 PMdatahub ingest, but on the execution only 1 table is captured (always the same)wooden-football-7175
02/16/2022, 5:14 PM'Source (redshift-usage) report:\n'
"{'workunits_produced': 1, 'workunit_ids': ['2022-02-15T00:00:00-db.amazon.settlement_report'], 'warnings': {}, 'failures': {}}\n"
'Sink (datahub-rest) report:\n'
"{'records_written': 1,\n"
" 'warnings': [],\n"
" 'failures': [],\n"
" 'downstream_start_time': datetime.datetime(2022, 2, 16, 17, 12, 50, 249168),\n"
" 'downstream_end_time': datetime.datetime(2022, 2, 16, 17, 12, 50, 268567),\n"
" 'downstream_total_latency_in_seconds': 0.019399}\n"
'\n'
'Pipeline finished successfully\n',
CLI EXIT
Source (redshift-usage) report:
{'failures': {}, 'warnings': {}, 'workunit_ids': ['2022-02-15T00:00:00-db.amazon.settlement_report'], 'workunits_produced': 1}
Sink (datahub-rest) report:
{'downstream_end_time': None,
'downstream_start_time': None,
'downstream_total_latency_in_seconds': None,
'failures': [],
'records_written': 0,
'warnings': []}wooden-football-7175
02/16/2022, 5:15 PMbig-carpet-38439
02/16/2022, 5:20 PMwooden-football-7175
02/16/2022, 5:20 PMwooden-football-7175
02/16/2022, 5:21 PMsource:
type: redshift-usage
config:
host_port: 'host:port'
database: db
username: user
password: '${FSECRET}'
env: PROD
email_domain: <http://domain.com|domain.com>
sink:
type: datahub-rest
config:
server: '<http://host:8080>'wooden-football-7175
02/16/2022, 5:21 PMwooden-football-7175
02/16/2022, 5:22 PMwooden-football-7175
02/16/2022, 5:23 PM# start_time: "2021-01-01T00:00:00Z"
end_time:
env: ENV
table_pattern:
allow: ["*"]
# schema_pattern:
# allow: ["*.schema.table"]
# deny: ["*schema*", "*shcmea2*", "db.schema.settlement_report"]wooden-football-7175
02/16/2022, 5:23 PMbig-carpet-38439
02/17/2022, 3:34 AMbig-carpet-38439
02/17/2022, 3:35 AMbig-carpet-38439
02/17/2022, 3:35 AMwooden-football-7175
02/17/2022, 12:36 PMdays with the start_time but no changes!!dazzling-judge-80093
02/17/2022, 12:39 PMstl_query system table to get queries and this system table has a 2-5 days of history based on how busy is your cluster. -> https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERY.htmlwooden-football-7175
02/17/2022, 12:59 PMredshift-usage.py and return a lots of rowswooden-football-7175
02/17/2022, 12:59 PMSELECT DISTINCT ss.userid,
ss.query,
sui.usename,
ss.tbl,
sq.querytxt,
sti.database,
sti.schema,
sti.table,
sq.starttime,
sq.endtime,
sq.aborted
FROM stl_scan ss
JOIN svv_table_info sti ON ss.tbl = sti.table_id
JOIN stl_query sq ON ss.query = sq.query
JOIN svl_user_info sui ON sq.userid = sui.usesysid
WHERE sq.aborted = 0
ORDER BY ss.endtime DESC;dazzling-judge-80093
02/17/2022, 1:00 PMdazzling-judge-80093
02/17/2022, 1:00 PMdazzling-judge-80093
02/17/2022, 1:00 PMdazzling-judge-80093
02/17/2022, 1:02 PMwooden-football-7175
02/17/2022, 1:16 PMwooden-football-7175
02/17/2022, 1:16 PMwooden-football-7175
02/17/2022, 1:16 PMdazzling-judge-80093
02/17/2022, 1:23 PMwooden-football-7175
02/17/2022, 1:23 PMwooden-football-7175
02/17/2022, 1:24 PMwooden-football-7175
02/17/2022, 1:31 PMdazzling-judge-80093
02/17/2022, 1:44 PMwooden-football-7175
02/17/2022, 1:49 PMwooden-football-7175
02/17/2022, 1:54 PMuserid|query |usename |tbl |querytxt |database |schema |table |starttime |endtime |aborted|
------+-------+---------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+-----------------+---------------------------------------------------+-----------------------+-----------------------+-------+
107|3866410| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:23:59.782|2022-02-16 18:23:59.870| 0|
107|3866408| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:23:54.119|2022-02-16 18:23:54.207| 0|
107|3866404| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:23:37.931|2022-02-16 18:23:42.440| 0|
107|3866363| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:20:23.860|2022-02-16 18:20:28.576| 0|
107|3866359| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:20:11.544|2022-02-16 18:20:11.609| 0|
107|3866254| |388568|SELECT CAST(| |analytics_agg | |2022-02-16 18:14:55.116|2022-02-16 18:15:04.481| 0|
107|3866256| |388568|SELECT "ta_1| |analytics_agg | |2022-02-16 18:14:55.367|2022-02-16 18:15:04.464| 0|
107|3866252| |388568|SELECT CAST(| |analytics_agg | |2022-02-16 18:14:55.088|2022-02-16 18:15:01.713| 0|
107|3866251| |388568|SELECT CAST(| |analytics_agg | |2022-02-16 18:14:55.083|2022-02-16 18:15:01.329| 0|
107|3866253| |388568|WITH "qt_0" | |analytics_agg | |2022-02-16 18:14:55.099|2022-02-16 18:15:01.194| 0|
107|3866246| |388568|WITH "qt_0" | |analytics_agg | |2022-02-16 18:14:55.000|2022-02-16 18:15:00.444| 0|
107|3866257| |388568|WITH "qt_0" | |analytics_agg | |2022-02-16 18:15:00.135|2022-02-16 18:15:00.400| 0|
107|3866250| |388568|WITH "qt_0" | |analytics_agg | |2022-02-16 18:14:55.071|2022-02-16 18:14:59.936| 0|
107|3866241| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:14:36.484|2022-02-16 18:14:42.388| 0|
107|3866238| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:14:21.729|2022-02-16 18:14:26.149| 0|
107|3866234| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:14:13.023|2022-02-16 18:14:17.680| 0|
107|3866232| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:14:03.163|2022-02-16 18:14:07.613| 0|
107|3866223| |388538|SELECT "ta_1| |analytics_agg | |2022-02-16 18:13:46.066|2022-02-16 18:13:46.151| 0|
107|3866221| |388570|SELECT "ta_1| |analytics_agg | |2022-02-16 18:13:39.783|2022-02-16 18:13:39.856| 0|
107|3866208| |388570|SELECT DATE_| |analytics_agg | |2022-02-16 18:12:42.430|2022-02-16 18:12:42.459| 0|
107|3866206| |388570|SELECT "ta_1| |analytics_agg | |2022-02-16 18:12:38.827|2022-02-16 18:12:38.892| 0|
107|3866203| |388570|SELECT "ta_1| |analytics_agg | |2022-02-16 18:12:33.817|2022-02-16 18:12:38.890| 0|
107|3866200| |388570|SELECT "ta_1| |analytics_agg | |2022-02-16 18:12:21.047|2022-02-16 18:12:21.313| 0|
107|3866199| |388538|SELECT DATE_| |analytics_agg | |2022-02-16 18:12:20.998|2022-02-16 18:12:21.273| 0|
107|3866197| |388538|SELECT DATE_| |analytics_agg | |2022-02-16 18:12:20.990|2022-02-16 18:12:21.255| 0|wooden-football-7175
02/17/2022, 1:55 PMdazzling-judge-80093
02/17/2022, 1:56 PMdazzling-judge-80093
02/17/2022, 1:57 PMSELECT DISTINCT ss.userid,
ss.query,
sui.usename,
ss.tbl,
sq.querytxt,
sti.database,
sti.schema,
sti.table,
sq.starttime,
sq.endtime,
sq.aborted
FROM stl_scan ss
JOIN svv_table_info sti ON ss.tbl = sti.table_id
JOIN stl_query sq ON ss.query = sq.query
JOIN svl_user_info sui ON sq.userid = sui.usesysid
WHERE ss.starttime >= '2020-12-15 20:08:23'
AND ss.starttime < '2023-12-15 20:08:23'
AND sq.aborted = 0
ORDER BY ss.endtime DESC;dazzling-judge-80093
02/17/2022, 1:59 PMdazzling-judge-80093
02/17/2022, 2:01 PMwooden-football-7175
02/17/2022, 2:03 PMdazzling-judge-80093
02/17/2022, 2:03 PMwooden-football-7175
02/17/2022, 2:03 PMwooden-football-7175
02/17/2022, 2:07 PMdazzling-judge-80093
02/17/2022, 2:07 PManalytics_agg is a table?wooden-football-7175
02/17/2022, 2:08 PMwooden-football-7175
02/17/2022, 2:09 PMwooden-football-7175
02/17/2022, 2:10 PMwooden-football-7175
02/17/2022, 2:11 PMdazzling-judge-80093
02/17/2022, 2:12 PMwooden-football-7175
02/17/2022, 2:12 PMwooden-football-7175
02/17/2022, 2:13 PMwooden-football-7175
02/17/2022, 2:15 PMdazzling-judge-80093
02/17/2022, 2:18 PMwooden-football-7175
02/17/2022, 2:18 PMwooden-football-7175
02/17/2022, 2:19 PMwooden-football-7175
02/17/2022, 2:19 PMdazzling-judge-80093
02/17/2022, 2:21 PMselect count(*) from (
SELECT DISTINCT ss.userid,
ss.query,
sui.usename,
ss.tbl,
sq.querytxt,
sti.database,
sti.schema,
sti.table,
sq.starttime,
sq.endtime,
sq.aborted
FROM stl_scan ss
JOIN svv_table_info sti ON ss.tbl = sti.table_id
JOIN stl_query sq ON ss.query = sq.query
JOIN svl_user_info sui ON sq.userid = sui.usesysid
WHERE ss.starttime >= '2020-12-15 20:08:23'
AND ss.starttime < '2023-12-15 20:08:23'
AND sq.aborted = 0
ORDER BY ss.endtime desc
);wooden-football-7175
02/17/2022, 2:21 PMdazzling-judge-80093
02/17/2022, 2:31 PMwooden-football-7175
02/17/2022, 2:35 PMwooden-football-7175
02/17/2022, 2:35 PMdazzling-judge-80093
02/17/2022, 2:35 PMwooden-football-7175
02/17/2022, 2:35 PMwooden-football-7175
02/17/2022, 2:35 PMwooden-football-7175
02/17/2022, 2:35 PMdazzling-judge-80093
02/17/2022, 2:36 PMwooden-football-7175
02/17/2022, 3:15 PMdazzling-judge-80093
02/17/2022, 3:17 PMsource:
type: redshift-usage
config:
# Coordinates
host_port: myredshift:5439
database: dev
options:
connect_args:
sslmode: prefer
# Credentials
username: username
password: password
start_time: 2020-12-15T20:08:23.091Z
end_time: 2023-12-15T20:08:23.091Z
email_domain: <http://test.com|test.com>
# see <https://datahubproject.io/docs/metadata-ingestion/sink_docs/datahub> for complete documentation
sink:
type: "datahub-rest"
config:
server: "<http://localhost:8080>"wooden-football-7175
02/17/2022, 3:23 PMoptions:
connect_args:
sslmode: preferwooden-football-7175
02/17/2022, 3:23 PMdazzling-judge-80093
02/17/2022, 3:24 PMwooden-football-7175
02/17/2022, 3:25 PMwooden-football-7175
02/17/2022, 3:25 PM'Sink (datahub-rest) report:\n'
"{'records_written': 855,\n"
" 'warnings': [],\n"
" 'failures': [],\n"
" 'downstream_start_time': datetime.datetime(2022, 2, 17, 15, 22, 20, 772669),\n"
" 'downstream_end_time': datetime.datetime(2022, 2, 17, 15, 22, 45, 606629),\n"
" 'downstream_total_latency_in_seconds': 24.83396}\n"
'\n'
'Pipeline finished successfully\n',dazzling-judge-80093
02/17/2022, 3:26 PMwooden-football-7175
02/17/2022, 3:26 PMdazzling-judge-80093
02/17/2022, 3:26 PMwooden-football-7175
02/17/2022, 3:26 PMdazzling-judge-80093
02/17/2022, 3:26 PMwooden-football-7175
02/17/2022, 3:27 PMdazzling-judge-80093
02/17/2022, 3:27 PMwooden-football-7175
02/17/2022, 3:28 PM" '2022-02-15T00:00:00-db.schema.settlement_report'],\n"
" 'warnings': {},\n"
" 'failures': {}}\n"
'Sink (datahub-rest) report:\n'
"{'records_written': 855,\n"
" 'warnings': [],\n"
" 'failures': [],\n"
" 'downstream_start_time': datetime.datetime(2022, 2, 17, 15, 26, 12, 119153),\n"
" 'downstream_end_time': datetime.datetime(2022, 2, 17, 15, 26, 39, 539770),\n"
" 'downstream_total_latency_in_seconds': 27.420617}\n"
'\n'
'Pipeline finished successfully\n',wooden-football-7175
02/17/2022, 3:28 PMwooden-football-7175
02/17/2022, 3:28 PMdazzling-judge-80093
02/17/2022, 3:29 PMdazzling-judge-80093
02/17/2022, 3:30 PMwooden-football-7175
02/17/2022, 3:30 PMwooden-football-7175
02/17/2022, 3:30 PMwooden-football-7175
02/17/2022, 3:30 PMwooden-football-7175
02/17/2022, 3:30 PMdazzling-judge-80093
02/17/2022, 3:31 PMwooden-football-7175
02/17/2022, 3:31 PMwooden-football-7175
02/17/2022, 3:32 PMwooden-football-7175
02/17/2022, 3:44 PMinclude_operational_stats do???wooden-football-7175
02/17/2022, 3:45 PMdazzling-judge-80093
02/17/2022, 4:12 PMwooden-football-7175
02/17/2022, 5:00 PM