Impact 2024: The Industrial Data and AI Conference for and by Users | Nominate Speakers Now for a Ch...
Hi Team,Please help me to find the mistakes in my code. Let me showcase the dummy codemain code:def main() -> None: """ Main entrypoint """ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) config_values_vault.set_vara() with Extractor( name="SAP_Extractor", description="An extractor to extract asset hierarchy from SAP based on root node", config_class=SapConfig, # version=__version__, # debugger version="1.0.0", run_handle=run, metrics=metrics, config_file_path= os.path.join(BASE_DIR, 'config.yaml'), ) as extractor: extractor.run() I have build code unittest for above code: def test_main(): with patch('os.path') as path_mock: with patch.object(path_mock, 'abspath') as mock_abspath: with patch.object(path_mock, 'dirname') as mock_dirname: with patch.object(path_mock,'join') as mock_join: mock_abspath.return_value = '/p
Hi Team, I need help to write the unit test using pytest,below is the code: row_list = cognite.raw.rows.list(file.destination.database, file.Extractor_Last_Run_Table, limit=-1, columns=["key", "LastUpdatedDatetime"]).to_pandas() if not row_list.empty: val = list(row_list[row_list.index.isin([file.Extractor_key])]['LastUpdatedDatetime'])Could you please help to write the unit test for above code?Thanks
Hi Team,In SAP Cognite Extractor, Till now we were able to use multiple existing columns in the key. Now, the requirement is like I want add some dynamic field in the key Like Usecase:Key : [Key1, Key2]Proposed Idea: I want append the date for all the keys so that I can keep track of all the records changes in every day.Key: [Key1, Key2, <Currentdatetime>] Thanks in advance,Sai Harshita
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.