NetRefer
Documents
Section titled “Documents”Stored Procedures
Section titled “Stored Procedures”- Sp_PersistNetReferDailyAll (main SP which should be executed using background job, and it will internally call all the SPs)
- Sp_PersistNetReferDailyRegistrationUsers - as of now we are fetching all those customers whose “Referal_Code” prop is not empty (we may required to add specific condition based on requirement, ex: code starting with “NETREFER_” something like that)
- Sp_PersistNetReferDailyCustomerDepositActivities (updated productId = 0 and subProductId = 0)
- Sp_PersistNetReferDailyCasinoActivities (Depends on Sp_CasinoGameCategoriesTransactionsConsolidatedByExternalId SP, that should be executed, before executing Sp_PersistNetReferDailyAll SP)
- Sp_SbDailyTransactionsByExternalIdAndBetTypeId (this is used for storing Sportsbook data group by externalId and BetTypeId)
- Sp_PersistNetReferDailySportsbookActivities (Depends on Sp_SbDailyTransactionsByExternalIdAndBetTypeId) From above, make sure, we have Sp_CasinoGameCategoriesTransactionsConsolidatedByExternalId SP should be run as job, and then Sp_PersistNetReferDailyAll should be run as job
SQL Jobs
Section titled “SQL Jobs”Glue Jobs
Section titled “Glue Jobs”Lambdas
Section titled “Lambdas”- BB_NetRefer_FailedDownloader Runs every hour and transfers failed files to S3 bucket
- BB_NetRefer_FileTransfer Triggers on S3 files in the pending/ directories and transfers them to NetRefer
- BB_NetRefer_DbUpdater
Scheduled Jobs
Section titled “Scheduled Jobs”Every hour the two jobs are run, looking to data in dw_reports.dbo.netrefer_data_activity and dw_reports.dbo.netrefer_data_registration respectively.
Any item with file_produced = 1 and file_sent = 0 will be picked up by the jobs which generates a bunch of files in the S3 bucket.
- Any file created in
Activity/pending/will trigger BB_NetRefer_FileTransfer - Any file created in
Customers/pending/will trigger BB_NetRefer_FileTransfer - Any file created in
file_sent_ack/will trigger BB_NetRefer_DbUpdater
Create a lambda that notifies us whenever a file is transferred to any of the /Customers/failed and /Activity/failed directories.