File tree Expand file tree Collapse file tree
definitions/output/reports Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const pastMonth = constants . fnPastMonth ( constants . currentMonth )
2+
3+ publish ( 'tech_report_geos' , {
4+ schema : 'reports' ,
5+ type : 'table' ,
6+ tags : [ 'tech_report' ]
7+ } ) . query ( ctx => `
8+ SELECT
9+ geo,
10+ adoption AS origins
11+ FROM ${ ctx . ref ( 'reports' , 'tech_report_adoption' ) }
12+ WHERE
13+ date = '${ pastMonth } '
14+ AND rank = 'ALL'
15+ AND technology = 'ALL'
16+ AND version = 'ALL'
17+ ${ constants . devRankFilter }
18+ ` ) . postOps ( ctx => `
19+ SELECT
20+ reports.run_export_job(
21+ JSON '''{
22+ "destination": "firestore",
23+ "config": {
24+ "database": "tech-report-api-${ constants . environment } ",
25+ "collection": "geos",
26+ "type": "dict"
27+ },
28+ "query": "SELECT * FROM ${ ctx . self ( ) } "
29+ }'''
30+ );
31+ ` )
Original file line number Diff line number Diff line change 1+ const pastMonth = constants . fnPastMonth ( constants . currentMonth )
2+
3+ publish ( 'tech_report_ranks' , {
4+ schema : 'reports' ,
5+ type : 'table' ,
6+ tags : [ 'tech_report' ]
7+ } ) . query ( ctx => `
8+ SELECT
9+ rank,
10+ adoption AS origins
11+ FROM ${ ctx . ref ( 'reports' , 'tech_report_adoption' ) }
12+ WHERE
13+ date = '${ pastMonth } '
14+ AND geo = 'ALL'
15+ AND technology = 'ALL'
16+ AND version = 'ALL'
17+ ${ constants . devRankFilter }
18+ ` ) . postOps ( ctx => `
19+ SELECT
20+ reports.run_export_job(
21+ JSON '''{
22+ "destination": "firestore",
23+ "config": {
24+ "database": "tech-report-api-${ constants . environment } ",
25+ "collection": "ranks",
26+ "type": "dict"
27+ },
28+ "query": "SELECT * FROM ${ ctx . self ( ) } "
29+ }'''
30+ );
31+ ` )
You can’t perform that action at this time.
0 commit comments