name: "db-table-analyzer"
This skill helps identify which tables need data source separation based on the FlinkDataSync configuration and actual database architecture.
This is not a simple read/write separation but rather a distinction between public/shared data and institutional business data.
Based on FlinkDataSync's tableList configuration, the following tables exist in both tugboatcommon and liandatugboatmis databases and need proper data source routing:
Disp_Port - Port informationDisp_PortDictionary - Port dictionaryDisp_Tugboat - Tugboat informationDisp_DeepLevel - Deep level informationDisp_Berthage - Berthage informationDisp_BerthageDictionary - Berthage dictionaryDisp_Pilot - Pilot informationDisp_Tugboatowner - Tugboat owner informationDisp_Waterway - Waterway informationBus_Holiday - Holiday informationBus_ShipPaymentType - Ship payment typesBus_ShipPaymentType_ShipType - Relationship between ship payment types and ship typesFin_AssistCode - Financial assist codesFin_AssistCodeItem - Financial assist code itemsFin_Subject - Financial subjectsFin_Subject_AssistCode - Relationship between financial subjects and assist codesFin_TaxRule - Tax rulesPro_FeeItemAssistCode - Fee item assist codesPro_FeeItemSettings - Fee item settingsSal_Holiday - Salary holiday informationSal_SocialInsuranceStandard - Social insurance standardsSal_TaxLevel - Tax levelsTug_Certificate - Certificate informationTables that exist only in one database and should use the appropriate data source:
Bus_CustomerCompany - Customer company informationBus_CustomerCompanyBusiness - Customer company business relationshipsBus_Customer_CustomerType - Customer typesBus_Ship - Ship informationSys_Menu - System menusSys_User - System usersSys_DictionaryItem - System dictionary itemsFor tables that exist in both databases:
@DataSource(RoutingDataSourceConfig.DataSourceType.COMMON) for common/shared data operations (tugboatcommon - system common library)@DataSource(RoutingDataSourceConfig.DataSourceType.BRANCH) for branch-specific operations (liandatugboatmis - branch institution business library)For tables that exist only in liandatugboatmis (branch business data):
@DataSource(RoutingDataSourceConfig.DataSourceType.BRANCH) consistentlyFor tables that exist only in tugboatcommon (common data):
@DataSource(RoutingDataSourceConfig.DataSourceType.COMMON) consistentlyThe new naming convention clearly reflects the database architecture:
COMMON → tugboatcommon: System common library, stores data shared by all institutionsBRANCH → liandatugboatmis: Branch institution business library, stores business data for individual institutionsThis eliminates confusion compared to the previous READ/WRITE naming that suggested a simple read/write separation.
Always verify that the @DataSource annotations align with the actual database architecture and business requirements.