Anchoring Scenarios & Troubleshooting¶
This page covers recommended practices, common real-world anchoring scenarios, and resolutions for issues you may encounter while anchoring an ASBO. For the core concepts and step-by-step procedures, see Anchoring Concept & Table Selection Wizard and The Table Mapper.
Best Practices for Anchoring¶
Pre-Anchoring Planning¶
Before beginning the anchoring process:
Understand Your Data Model¶
- ✓ Review the database table structure thoroughly
- ✓ Understand the meaning and purpose of each column
- ✓ Identify primary keys and required columns
- ✓ Document any business rules or constraints
Plan Your ASBO Structure¶
- ✓ Decide which columns should map to which attributes
- ✓ Determine appropriate logical data types
- ✓ Identify which attributes will serve as RN and RD
- ✓ Consider future scalability and additional environments
Verify Prerequisites¶
- ✓ Ensure datasource connectivity is stable
- ✓ Confirm you have appropriate database permissions
- ✓ Test datasource connection before anchoring
- ✓ Verify the target table contains actual data (if possible)
During Anchoring¶
Systematic Mapping Approach¶
- ✓ Map critical attributes first (primary key, RN, RD candidates)
- ✓ Review each type incompatibility warning carefully
- ✓ Use meaningful attribute names if creating new attributes
- ✓ Document any type mutations or transformations applied
Validation and Review¶
- ✓ Double-check all mappings before saving
- ✓ Verify that required business attributes are mapped
- ✓ Ensure data types make logical sense for the use case
- ✓ Test drag-and-drop operations before committing
Post-Anchoring Actions¶
Immediate Follow-up¶
- ✓ Configure RN and RD for the anchored ASBO
- ✓ Perform a test import of a small number of resources
- ✓ Verify imported data matches expectations
- ✓ Review and validate the master environment mapping
Documentation¶
- ✓ Document the anchoring decision and rationale
- ✓ Record which datasource/schema/table was selected
- ✓ Note any special mappings or type mutations
- ✓ Update team documentation and knowledge base
Testing and Validation¶
- ✓ Import a sample set of resources
- ✓ Verify all mapped attributes are populated correctly
- ✓ Test RN and RD rendering
- ✓ Validate data integrity and completeness
Common Anchoring Scenarios¶
Scenario 1: Anchoring a New ASBO to an Existing Table¶
Situation: You manually created an ASBO and need to link it to an existing database table.
Steps:
- Click the "Anchor" button on the newly created ASBO
- Select the appropriate datasource, schema, and table
- Review the table structure using the schema viewer
- Open the Table Mapper
- Systematically map each ASBO attribute to the corresponding table column
- Address any type incompatibilities using the Mutate Type feature
- Verify all critical attributes are mapped (especially RN and RD)
- Save the anchoring configuration
- Test import a small set of resources to validate the mappings
Outcome: The ASBO is now anchored and ready for resource imports.
Scenario 2: Re-anchoring After Master Mapping Deletion¶
Situation: A master environment mapping was deleted, and the ASBO needs to be re-anchored.
Steps:
- Verify that the ASBO shows as "unanchored" in the interface
- Click the "Anchor" button (which becomes available again)
- Select a datasource, schema, and table
- In the Table Mapper, map columns to attributes
- Note that you're creating a new master mapping with a potentially different structure
- Complete the anchoring process
- Consider re-importing existing resources to align with the new structure
Outcome: A new master environment mapping is created, and the ASBO is anchored again.
Structure May Change
When re-anchoring, the new table's structure defines the ASBO structure going forward. This may differ from the previous anchoring, potentially causing incompatibilities with existing environment mappings or resources.
Scenario 3: Anchoring to a Database View¶
Situation: You need to anchor an ASBO to a database view rather than a base table.
Steps:
- Ensure the database view exists and is accessible via the datasource
- Click "Anchor" on the ASBO
- Select the datasource and schema containing the view
- In the table selection list, locate and select the view (views are typically marked with a special icon)
- Review the view's column structure using the schema viewer
- Open the Table Mapper and establish column-to-attribute mappings
- Complete the anchoring process
Outcome: The ASBO is anchored to the view, and resource imports will execute queries against the view definition.
Benefits of Views
Anchoring to views provides flexibility:
- Transform data: Apply business logic at the database level
- Hide complexity: Abstract complex joins or calculations
- Column renaming: Alias columns to match expected attribute names
- Filtering: Pre-filter data that should be imported
Scenario 4: Anchoring with Minimal Attribute Set¶
Situation: You want to anchor an ASBO but only map a subset of available columns.
Steps:
- Begin the anchoring process as normal
- In the Table Mapper, map only the essential columns:
- Primary key column
- Columns for RN and RD
- Critical business attributes
- Leave other attributes unmapped for now
- Save the anchoring configuration
- Test import resources to verify the minimal mapping works
- Return later to add additional mappings as needed
Outcome: The ASBO is anchored with minimal mappings, allowing for incremental configuration.
Iterative Approach
You don't need to map all attributes during initial anchoring. Start with essentials and expand the mapping over time as requirements evolve.
Scenario 5: Anchoring with Type Transformations¶
Situation: Database column types don't match your desired logical types, requiring transformations.
Steps:
- Begin the anchoring process and open the Table Mapper
- Drag a column to an attribute and encounter a type incompatibility warning
- Review the suggested type change carefully
- If acceptable, click "Mutate Type" to apply the transformation
- If not acceptable, consider:
- Creating a database view with
CASTorCONVERToperations - Modifying the ASBO attribute type manually before mapping
- Using a different column that has the correct type
- Repeat for each column requiring type handling
- Complete the anchoring process after all transformations are resolved
Outcome: The ASBO is anchored with appropriate type mappings, either through mutations or database-level transformations.
Type Transformation Considerations
When using type mutations:
- Ensure the transformation makes semantic sense
- Verify that data can be safely converted (e.g., VARCHAR to DateTime requires proper format)
- Test thoroughly with actual data to catch conversion errors
- Document transformations for future maintainers
Troubleshooting Anchoring Issues¶
No Datasources Available¶
Symptoms:
- Error message appears when clicking "Anchor"
- "No active datasources" warning displayed
- Cannot proceed to table selection
Resolution:
- Navigate to the Datasources configuration section
- Verify at least one datasource exists
- Check that the datasource status is "Active" and "Online"
- Test datasource connectivity:
- Click "Test Connection" if available
- Review connection parameters (host, port, database name)
- Verify credentials are correct and not expired
- If no datasources exist, create a new one:
- Provide connection details
- Test the connection
- Activate the datasource
- Return to the ASBO and retry anchoring
Schema or Table Lists Empty¶
Symptoms:
- Datasource is selected but no schemas appear
- Schema is selected but no tables appear
- Dropdown lists show "No items found"
Resolution:
- Verify permissions:
- Ensure the datasource credentials have
SELECTpermission on information schema - Check that the database user can enumerate schemas and tables
-
Verify no database-level restrictions on metadata access
-
Check datasource configuration:
- Confirm the datasource is pointing to the correct database server
- Verify the default schema or database is set correctly
-
Review any schema filtering or exclusion rules in the datasource settings
-
Test database access directly:
-- Test schema access SELECT schema_name FROM information_schema.schemata; -- Test table access SELECT table_name FROM information_schema.tables WHERE table_schema = 'your_schema'; -
Refresh the datasource:
- Navigate to datasource configuration
- Click "Refresh Metadata" or "Reconnect"
- Return to anchoring wizard and retry
Type Incompatibility Cannot Be Resolved¶
Symptoms:
- Repeated type mismatch warnings
- Mutate Type doesn't produce the desired result
- No compatible columns available for an attribute
Resolution:
- Understand the root cause:
- Review the column's actual data type in the database
- Determine if the data can be safely converted to the desired logical type
-
Check if sample data matches the expected format
-
Database-level solutions:
-- Create a view with type conversions CREATE VIEW compatible_table_v AS SELECT CAST(varchar_column AS INTEGER) AS numeric_attribute, TO_DATE(string_date, 'YYYY-MM-DD') AS date_attribute, CAST(bit_column AS BOOLEAN) AS boolean_attribute FROM source_table; -
ASBO-level solutions:
- Modify the ASBO attribute type to match the column type
- Add a transformation step in your data pipeline
-
Use middleware or ETL to pre-process data before import
-
Alternative approaches:
- Map to a different column that has compatible type
- Store the raw value and transform at the application level
- Create a computed column in the database with the correct type
Drag and Drop Not Working¶
Symptoms:
- Columns cannot be dragged
- Drop zones don't activate
- No visual feedback during drag operations
Resolution:
- Browser issues:
- Refresh the browser page
- Clear browser cache and cookies
- Try a different browser (Chrome, Firefox, Edge recommended)
-
Disable browser extensions that might interfere with drag-and-drop
-
UI state issues:
- Close and reopen the Table Mapper
- Exit the anchoring wizard and start again
-
Log out and log back in to BizMetry
-
Data loading issues:
- Ensure the table structure has fully loaded (watch for loading indicators)
- Wait a few seconds after the interface opens before attempting drag operations
-
Check browser console for JavaScript errors
-
Alternative mapping method:
- If drag-and-drop continues to fail, check if there's a manual mapping option
- Some interfaces may provide dropdown-based mapping as an alternative
Anchoring Saves But Resources Won't Import¶
Symptoms:
- Anchoring completes successfully
- Import operations fail or return no data
- Error messages about missing columns or invalid mappings
Resolution:
- Verify the master environment mapping:
- Navigate to Env Mappings for the ASBO
- Confirm the master mapping was created
-
Check that it points to the correct datasource/schema/table
-
Check attribute mappings:
- Review each attribute in the ASBO configuration
- Verify the
column_metadata_namefield is populated correctly -
Ensure critical attributes (especially primary key) are mapped
-
Test datasource connectivity from import context:
- The import process may use different credentials or connection pooling
- Verify the agent or import service can reach the database
-
Check firewall rules and network connectivity
-
Review import logs:
- Check detailed error messages in the import logs
- Look for SQL errors, connection timeouts, or permission denials
-
Identify which specific column or query is failing
-
Validate data compatibility:
- Query the table directly to ensure data exists
- Check that data values are compatible with mapped types
- Verify primary key values are unique and not null
Duplicate Attribute Names Causing Issues¶
Symptoms:
- Cannot create new attributes from columns
- Drop zone is always disabled
- Error about attribute name conflicts
Resolution:
- Identify the conflict:
- Review all existing ASBO attributes
- Note which attribute name matches the column name
-
Determine if they should represent the same or different data
-
If they represent the same data:
- Map the column to the existing attribute instead of creating new
-
Verify the existing attribute has the correct type
-
If they represent different data:
- Rename the existing attribute to something more specific
- Use the ASBO configuration editor to change the attribute name
-
Return to Table Mapper and create the new attribute
-
If using a view:
-- Alias column to avoid naming conflict CREATE VIEW table_with_unique_names AS SELECT existing_column AS existing_column_v2, -- other columns FROM source_table;
Cannot Remove Mappings¶
Symptoms:
- X button doesn't respond
- Mapping remains after clicking remove
- Error when trying to unmap
Resolution:
- UI refresh:
- Close and reopen the Table Mapper
- Refresh the browser page
-
Try clicking the X button again
-
Check for dependencies:
- Some mappings may be protected if used in RN/RD configuration
- Verify the attribute isn't marked as required or locked
-
Check if the attribute is used in any business rules
-
Alternative approach:
- Save the current state and exit Table Mapper
- Edit the ASBO configuration directly
- Remove the
column_metadata_namevalue for the attribute - Return to Table Mapper to remap if needed
Impact of Anchoring on ASBO Lifecycle¶
Understanding how anchoring affects the ASBO throughout its lifecycle is important for effective management.
Structural Definition¶
Once anchored, the ASBO's structure is permanently defined by the table used during anchoring:
- Column snapshot: The structure reflects the table columns at the moment of anchoring
- Immutable base: This structure cannot be changed without re-anchoring
- Validation basis: All future environment mappings must match this structure
Structure Permanence
The structure established during anchoring serves as the canonical definition. Even if the source table changes later (columns added/removed), the ASBO structure remains fixed unless you re-anchor.
Environment Mapping Compatibility¶
After anchoring, any additional environment mappings you create must have table structures that match the anchored structure:
- Validation enforcement: BizMetry validates new environment mappings against the master structure
- Column matching: All columns from the master must exist in new environment tables
- Type compatibility: Data types must be compatible across environments
Cross-Environment Consistency
If you anchor to a DEV table and later want to create a PROD environment mapping, the PROD table must have the exact same structure (column names and compatible types) as the DEV table used for anchoring.
Resource Import Capability¶
Anchoring directly enables resource import functionality:
- Before anchoring: Cannot import resources from database
- After anchoring: Can import resources using the established mappings
- RN/RD configuration: Becomes possible only after anchoring
Anchoring vs. Environment Mapping¶
It's important to understand the distinction between these two related concepts:
Anchoring (Master Mapping Creation)¶
- Purpose: Initially links an ASBO to a physical table
- Occurs: Once, when first connecting an ASBO to a database
- Creates: The master environment mapping
- Defines: The canonical structure for the ASBO
- Requirement: ASBO must be unanchored
Environment Mapping (Additional Mappings)¶
- Purpose: Links the same ASBO to tables in other environments
- Occurs: Multiple times, after initial anchoring
- Creates: Secondary environment mappings
- Validates: Against the master structure
- Requirement: ASBO must already be anchored
Workflow Example:
- DEV Environment: Anchor ASBO to
dev_db.clientstable (creates master mapping) - QA Environment: Create env mapping to
qa_db.clientstable (validates against master) - PROD Environment: Create env mapping to
prod_db.clientstable (validates against master)
Related Topics¶
- Anchoring Concept & Table Selection Wizard
- The Table Mapper
- Understanding Environment Mappings
- Creating a New Environment Mapping
- Editing an Environment Mapping
- Deleting an Environment Mapping
- Importing Resources from Database
- Configuring Resource Name (RN) and Resource Description (RD)
- Configuring Datasources
- Managing Environments
- Resource Type Configuration
- Troubleshooting Import Issues