File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ def __init__(
9292 credentials .password ,
9393 credentials .client_id ,
9494 credentials .client_secret ,
95- dataspace = dataspace ,
95+ dataspace ,
9696 )
9797 else :
9898 self ._conn = SalesforceCDPConnection (
Original file line number Diff line number Diff line change @@ -64,7 +64,13 @@ def run_entrypoint(
6464 f"Please ensure config.json contains a 'dataspace' field."
6565 )
6666
67+ # Load config file first (if provided) so that dataspace from config.json
68+ # can override any dataspace in the config file
69+ if config_file :
70+ config .load (config_file )
71+
6772 # Add dataspace to reader config options
73+ # (after loading config file to ensure it takes precedence)
6874 if config .reader_config and hasattr (config .reader_config , "options" ):
6975 config .reader_config .options ["dataspace" ] = dataspace
7076 # Add dataspace to writer config options (for PrintDataCloudWriter)
@@ -76,9 +82,6 @@ def run_entrypoint(
7682 config .reader_config .options ["credentials_profile" ] = profile
7783 if config .writer_config and hasattr (config .writer_config , "options" ):
7884 config .writer_config .options ["credentials_profile" ] = profile
79-
80- if config_file :
81- config .load (config_file )
8285 for dependency in dependencies :
8386 try :
8487 importlib .import_module (dependency )
You can’t perform that action at this time.
0 commit comments