Skip to content

Commit

Permalink
Test demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
poffo committed Feb 21, 2024
1 parent 412ce39 commit a741aea
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
35 changes: 35 additions & 0 deletions mastering-carol/sql-pipelines/pipedemo.csql
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
WITH organization_apinvoice AS (
SELECT
null AS _orgid,
null AS businesspartner_id,
null AS docreference,
null AS invoice_id,
null AS docissue,
null AS erp_id,
null AS protheus_id,
null AS transactiontype,
null AS deleted,
null AS installmentqty
--metadata--
FROM (
SELECT * EXCEPT(ranking)
FROM (
SELECT ROW_NUMBER() OVER (partition BY mdmId ORDER BY mdmCounterForEntity DESC) ranking, *
FROM stg_protheus_carol_organization
--timestamp-- WHERE mdmCounterForEntity__DATETIME__ > SAFE.DATETIME(TIMESTAMP_MICROS(SAFE_CAST({{start_from}} AS INT64)))
)
WHERE ranking = 1
) AS stg
),
combinedSources AS (
SELECT * FROM organization_apinvoice
),
processedData AS (
SELECT *
FROM combinedSources
-- WHERE
-- rejection rules
)

SELECT * FROM processedData

23 changes: 23 additions & 0 deletions mastering-carol/sql-pipelines/pipelines.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,29 @@
]
}
},
{
"useBatchNotification": true,
"pipelineName": "pipedemo",
"pipelineDescription": "Pipeline durante demo Carol",
"outputDataModelName": "organization",
"overlapDeltaMinutes": 60,
"saveToCds": false,
"saveToUnified": true,
"sendToSubscriptions": true,
"cronExpressions": ["0 0 * * * ?"],
"timeZone": "America/Sao_Paulo",
"prepareScripts": [""],
"processScript": "pipedemo.csql",
"sourceEntities": {
"dataModels": [],
"stagings": [
{
"connectorName": "protheus_carol",
"stagingName": "sa2"
}
]
}
},
{
"useBatchNotification": true,
"pipelineName": "organization_pipeline",
Expand Down

0 comments on commit a741aea

Please sign in to comment.