adjustments

This commit is contained in:
Jonny Dixon 2025-03-18 09:15:00 +00:00
parent a81fa2492a
commit 8a6dfcde77

View File

@ -1,3 +1,8 @@
"""
This is an updated version of fivetran_standard_api.py with the fix for BigQuery case handling.
The key fix is in the _fill_connectors_lineage method, which now properly lowercases table names for BigQuery.
"""
import logging import logging
from typing import Dict, List, Optional, Set, Tuple from typing import Dict, List, Optional, Set, Tuple
@ -414,15 +419,16 @@ class FivetranStandardAPI(FivetranAccessInterface):
source_table = f"{schema_name}.{table_name}" source_table = f"{schema_name}.{table_name}"
# Adjust case based on destination platform # Adjust case based on destination platform
# FIX: Use the helper method from api_client for consistent case handling
dest_schema = ( dest_schema = (
schema_name.upper() self.api_client._get_destination_schema_name(
if destination_platform != "bigquery" schema_name, destination_platform
else schema_name )
) )
dest_table = ( dest_table = (
table_name.upper() self.api_client._get_destination_table_name(
if destination_platform != "bigquery" table_name, destination_platform
else table_name )
) )
destination_table = f"{dest_schema}.{dest_table}" destination_table = f"{dest_schema}.{dest_table}"
@ -440,11 +446,9 @@ class FivetranStandardAPI(FivetranAccessInterface):
if not col_name: if not col_name:
continue continue
# Destination column name follows same case convention as table # FIX: Use the helper method for consistent case handling
dest_col_name = ( dest_col_name = self.api_client._get_destination_column_name(
col_name.upper() col_name, destination_platform
if destination_platform != "bigquery"
else col_name
) )
column_lineage.append( column_lineage.append(