Legacy Pipeline Atlas worker-1snapshot 2026-07-15

sub-job

Commonwealth · Load-Athena-Data-ImportSql

called by Daily-Accounts-Processing

sub-job Commonwealth/Load-Athena-Data-ImportSql · db Commonwealth_ProdMirror · updated 2025-11-05

task tree

What the sub-job runs

Tasks in order, each with what it does — typed stepsfrom the MDClarity task docs (click to open the reference), sub-jobsyou can expand inline (▶) to reveal their own tasks, and SQL steps summarized by Gemini (✨). Every step shows the tables it writes/reads and which earlier step it feeds from(sqlglot lineage).

sub-job

Load-Athena-Data-ImportSql

44 tasks · Commonwealth
sub-job / Flow action SQL / native step▶ expand a sub-job inline · ↗ open it as its own page · a typed step opens its doc
  1. ImportClinicalEncounterImportClinicalEncounter
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportClinicalEncounter
    connection string={AthenaConnectionString}table name=ImportClinicalEncounterimport mode=Replacedata source type=Snowflake
  2. Merge SourceClinicalEncountersqlload_athena_data_importsql__merge_sourceclinicalencounter.sql
    Synchronizes clinical encounter details from imported data to the source layer to reflect the most recent patient visits.
    writes SOURCECLINICALENCOUNTER · reads ImportClinicalEncounter
    ↳ feeds from ImportClinicalEncounter
  3. ImportAppointmentImportAppointment
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportAppointment
    connection string={AthenaConnectionString}table name=ImportAppointmentimport mode=Replacedata source type=Snowflake
  4. Merge SourceAppointmentsqlload_athena_data_importsql__merge_sourceappointment.sql
    Updates the source appointment table with the latest scheduling, check-in, and status information from the import layer.
    writes SourceAppointment · reads ImportAppointment
    ↳ feeds from ImportAppointment
  5. ImportClaimImportClaim
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportClaim
    connection string={AthenaConnectionString}table name=ImportClaimimport mode=Replacedata source type=Snowflake
  6. Merge SourceClaimsqlload_athena_data_importsql__merge_sourceclaim.sql
    Merges the latest insurance claim data into the source layer to track billing status and outstanding balances.
    writes SOURCECLAIM · reads ImportClaim
    ↳ feeds from ImportClaim
  7. ImportTransactionImportTransaction
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportTransaction
    connection string={AthenaConnectionString}table name=ImportTransactionimport mode=Replacedata source type=Snowflake
  8. Merge SourceTransactionsqlload_athena_data_importsql__merge_sourcetransaction.sql
    Updates the master transaction table with new or modified records from the imported transaction data.
    writes SOURCETRANSACTION · reads ImportTransaction
    ↳ feeds from ImportTransaction
  9. Merge SourceTransactionChargesqlload_athena_data_importsql__merge_sourcetransactioncharge.sql
    Updates the charge transaction table by filtering and synchronizing charge-type records from the main transaction source.
    writes SOURCETRANSACTIONCHARGE · reads SOURCETRANSACTION
    ↳ feeds from Merge SourceTransaction
  10. Merge SourceTransactionPaymentsqlload_athena_data_importsql__merge_sourcetransactionpayment.sql
    Updates the payment transaction table by filtering and synchronizing payment-type records from the main transaction source.
    writes SOURCETRANSACTIONPAYMENT · reads SOURCETRANSACTION
    ↳ feeds from Merge SourceTransaction
  11. Merge SourceTransactionAdjustmentsqlload_athena_data_importsql__merge_sourcetransactionadjustment.sql
    Updates the adjustment transaction table by filtering and synchronizing adjustment-type records from the main transaction source.
    writes SOURCETRANSACTIONADJUSTMENT · reads SOURCETRANSACTION
    ↳ feeds from Merge SourceTransaction
  12. Merge SourceTransactionTransfersqlload_athena_data_importsql__merge_sourcetransactiontransfer.sql
    Updates the transfer transaction table by filtering and synchronizing transfer-in and transfer-out records from the main transaction source.
    writes SOURCETRANSACTIONTRANSFER · reads SOURCETRANSACTION
    ↳ feeds from Merge SourceTransaction
  13. ImportERABatchImportERABatch
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportERABatch
    connection string={AthenaConnectionString}table name=ImportERABatchimport mode=Replacedata source type=Snowflake
  14. Merge SourceERABatchsqlload_athena_data_importsql__merge_sourceerabatch.sql
    Synchronizes electronic remittance advice batch information from the import staging area to the source batch table.
    writes SOURCEERABATCH · reads ImportERABatch
    ↳ feeds from ImportERABatch
  15. ImportERARecordImportERARecord
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportERARecord
    connection string={AthenaConnectionString}table name=ImportERARecordimport mode=Replacedata source type=Snowflake
  16. Merge SourceERARecordsqlload_athena_data_importsql__merge_sourceerarecord.sql
    Synchronizes individual electronic remittance advice records from the import staging area to the source record table.
    writes SOURCEERARECORD · reads ImportERARecord
    ↳ feeds from ImportERARecord
  17. ImportERADetailImportERADetail
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportERADetail
    connection string={AthenaConnectionString}table name=ImportERADetailimport mode=Replacedata source type=Snowflake
  18. Merge SourceERADetailsqlload_athena_data_importsql__merge_sourceeradetail.sql
    Synchronizes granular electronic remittance advice details from the import staging area to the source detail table.
    writes SOURCEERADETAIL · reads ImportERADetail
    ↳ feeds from ImportERADetail
  19. ImportERAKickImportERAKick
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportERAKick
    connection string={AthenaConnectionString}table name=ImportERAKickimport mode=Replacedata source type=Snowflake
  20. Merge SourceERAKicksqlload_athena_data_importsql__merge_sourceerakick.sql
    Updates or inserts electronic remittance advice kick records to track claim rejections and mapping details within the pipeline.
    writes SOURCEERAKICK · reads ImportERAKick
    ↳ feeds from ImportERAKick
  21. ImportClaimNoteImportClaimNote
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportClaimNote
    connection string={AthenaConnectionString}table name=ImportClaimNoteimport mode=Replacedata source type=Snowflake
  22. Merge SourceClaimNotesqlload_athena_data_importsql__merge_sourceclaimnote.sql
    Updates or inserts claim notes and status information to maintain a history of billing actions and denial reasons.
    writes SOURCECLAIMNOTE · reads ImportClaimNote
    ↳ feeds from ImportClaimNote
  23. ImportDenialClaimNoteImportDenialClaimNote
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportDenialClaimNote
    connection string={AthenaConnectionString}table name=ImportDenialClaimNoteimport mode=Replacedata source type=Snowflake
  24. Merge SourceDenialClaimNotesqlload_athena_data_importsql__merge_sourcedenialclaimnote.sql
    Updates or inserts denial-specific claim notes to track rejection reasons, provider details, and claim status changes.
    writes SOURCEDENIALCLAIMNOTE · reads ImportDenialClaimNote
    ↳ feeds from ImportDenialClaimNote
  25. ImportPatientImportPatient
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportPatient
    connection string={AthenaConnectionString}table name=ImportPatientimport mode=Replacedata source type=Snowflake
  26. Merge SourcePatientsqlload_athena_data_importsql__merge_sourcepatient.sql
    Updates or inserts patient demographic and contact information to ensure accurate patient identification and communication records.
    writes SOURCEPATIENT · reads ImportPatient
    ↳ feeds from ImportPatient
  27. ImportPayerImportPayer
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportPayer
    connection string={AthenaConnectionString}table name=ImportPayerimport mode=Replacedata source type=Snowflake
  28. Merge SourcePayersqlload_athena_data_importsql__merge_sourcepayer.sql
    Updates or inserts insurance payer and package details to manage coverage types, reporting categories, and effective dates.
    writes SOURCEPAYER · reads ImportPayer
    ↳ feeds from ImportPayer
  29. ImportPatientInsuranceImportPatientInsurance
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportPatientInsurance
    connection string={AthenaConnectionString}table name=ImportPatientInsuranceimport mode=Replacedata source type=Snowflake
  30. Merge SourcePatientInsurancesqlload_athena_data_importsql__merge_sourcepatientinsurance.sql
    Updates or inserts patient insurance policy records, including coverage sequence, policy numbers, and eligibility status.
    writes SOURCEPATIENTINSURANCE · reads ImportPatientInsurance
    ↳ feeds from ImportPatientInsurance
  31. ImportProviderImportProvider
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportProvider
    connection string={AthenaConnectionString}table name=ImportProviderimport mode=Replacedata source type=Snowflake
  32. Merge SourceProvidersqlload_athena_data_importsql__merge_sourceprovider.sql
    Updates or inserts healthcare provider information, including NPI numbers, specialties, and taxonomy codes for billing and reporting.
    writes SOURCEPROVIDER · reads ImportProvider
    ↳ feeds from ImportProvider
  33. ImportDepartmentImportDepartment
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportDepartment
    connection string={AthenaConnectionString}table name=ImportDepartmentimport mode=Replacedata source type=Snowflake
  34. Merge SourceDepartmentsqlload_athena_data_importsql__merge_sourcedepartment.sql
    Updates or inserts clinical department and facility location data to support accurate service location tracking and billing.
    writes SOURCEDEPARTMENT · reads ImportDepartment
    ↳ feeds from ImportDepartment
  35. ImportFeeScheduleProcedureImportFeeScheduleProcedure
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportFeeScheduleProcedure
    connection string={AthenaConnectionString}table name=ImportFeeScheduleProcedureimport mode=Replacedata source type=Snowflake
  36. Merge SourceFeeScheduleProceduresqlload_athena_data_importsql__merge_sourcefeescheduleprocedure.sql
    Updates the source fee schedule procedure table with the latest pricing and procedure code mappings from imported data.
    writes SOURCEFEESCHEDULEPROCEDURE · reads ImportFeeScheduleProcedure
    ↳ feeds from ImportFeeScheduleProcedure
  37. ImportProcedureCodeImportProcedureCode
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportProcedureCode
    connection string={AthenaConnectionString}table name=ImportProcedureCodeimport mode=Replacedata source type=Snowflake
  38. Merge SourceProcedureCodesqlload_athena_data_importsql__merge_sourceprocedurecode.sql
    Updates the master procedure code list with current descriptions, groups, and effective dates from the source system.
    writes SOURCEPROCEDURECODE · reads ImportProcedureCode
    ↳ feeds from ImportProcedureCode
  39. ImportFeeScheduleImportFeeSchedule
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportFeeSchedule
    connection string={AthenaConnectionString}table name=ImportFeeScheduleimport mode=Replacedata source type=Snowflake
  40. Merge SourceFeeSchedulesqlload_athena_data_importsql__merge_sourcefeeschedule.sql
    Updates the source fee schedule headers with current names, insurance package links, and effective dates from imported data.
    writes SOURCEFEESCHEDULE · reads ImportFeeSchedule
    ↳ feeds from ImportFeeSchedule
  41. ImportProcedureCodeModifierImportProcedureCodeModifier
    Imports data from SQL Server or Snowflake queries into target tables using bulk copy operations with configurable loading modes.
    writes ImportProcedureCodeModifier
    connection string={AthenaConnectionString}table name=ImportProcedureCodeModifierimport mode=Replacedata source type=Snowflake
  42. Merge SourceProcedureCodeModifiersqlload_athena_data_importsql__merge_sourceprocedurecodemodifier.sql
    Updates the source procedure code modifier table with the latest descriptions and metadata from the imported source data.
    writes SOURCEPROCEDURECODEMODIFIER · reads ImportProcedureCodeModifier
    ↳ feeds from ImportProcedureCodeModifier
  43. Merge SourceChargeMastersqlload_athena_data_importsql__merge_sourcechargemaster.sql
    Builds the charge master by joining fee schedules and procedure codes to maintain standard pricing and modifier details.
    writes SOURCECHARGEMASTER · reads sourcefeeschedulesourcefeescheduleproceduresourceprocedurecode
    ↳ feeds from Merge SourceFeeSchedule, Merge SourceFeeScheduleProcedure, Merge SourceProcedureCode
  44. Merge SourceTimesheetEntryTransactionMergeSql
    writes SourceTimesheetEntryTransaction · reads TIMESHEETENTRYTIMESHEETENTRYTRANSACTION
    merge data source type=Snowflakeconnection string={AthenaConnectionString}table name=SourceTimesheetEntryTransactionmerge mode=InsertUpdatebulk copy timeout seconds=300