"Not in" set programming issue

I have created a set :
technical_data_assets_set
Now I am going through a list and want to perform some code only record if it is not in the set:

        if result_list_Assets[ii]['domain'].get('id') not in technical_data_assets_set:
            modified_dictionary = {'id': '',

I get no errors, but I am getting records processed that are in the set.

There is not enough code nor contextual information provided to conclude what is causing the problem, but not in with sets works as you seem to expect. If technical_data_assets_set is any collection (a set, list, tuple, etc), and result_list_Assets[ii]['domain'].get('id') is an object that does not compare equal to any element in the collection, then the if statement will evaluate true and the presumably abridged code modified_dictionary = {'id': '', will fire.

If this does not produce the expected result, then either one of those preconditions is not satisfied (which you can check with logging, a debugger, print statements, the interactive interpreter, etc), or the code inside the if block (not shown above) does not do what you expect.

Tis is the code that creates the set. The print of the set looks good.

technical_data_assets_set = {’’}
for i in range(loopCountTA + 1):
#for i in range(loopCountTA + 1):
userParams = {}
userParams[‘communityId’] = ‘b23eedc6-ffa3-4c67-8974-e5d5a36b513c’
userParams[‘offset’] = i * 1000

        params = {}
        for k, v in kwargs.items():
            params[k] = v

        collibraResponseTechnicalAssets2 = requests.get(self.collibraRestURL + '/assets',
                                                        auth=HTTPBasicAuth(self.username, self.password),
                                                        params = userParams)
        #print(userParams)

        technical_data_assets = create_response_tuple(collibraResponseTechnicalAssets2)
        result_list_TA = technical_data_assets[1].get("results")

        for j in range(len(result_list_TA)):
            if 'domain' in result_list_TA[j]:
                technical_data_assets_set.add(result_list_TA[j]['domain'].get('id'))

This is the code where I access the set.

#for ii in range(loopCountAssets + 1):
for ii in range(loopCountAssets + 1):
userParams2 = {}
userParams2[‘limit’] = 5000
userParams2[‘offset’] = ii * 1000

        #print(userParams2)

        params = {}
        for k, v in kwargs.items():
            params[k] = v
        collibraResponseAssets = requests.get(self.collibraRestURL + '/assets',
                                    auth=HTTPBasicAuth(self.username, self.password),
                                    params = userParams2)

        asset_data = create_response_tuple(collibraResponseAssets)
        if asset_data[0] != 200:
            messages.append('ERROR: Asset Data Collibra extract has encountered errors!')
            http_error(asset_data, messages, indent=indent1, debug=1)
            quit()
        result_list_Assets = asset_data[1].get("results")

        if result_list_Assets[ii]['domain'].get('id') not in technical_data_assets_set:
            modified_dictionary = {'id': '',
            etc.

As a reminder, please remember to format your code and output in code blocks (either three ```s above and below, or use the </> button, like this:

```
YOUR CODE AND OUTPUT HERE
```

Otherwise, it will not be displayed correctly on Discourse.

What we really need here is a Minimal Reproducible Example—a minimal but complete code snippit that reproduces the specific issue you are seeing, and only that issue, without any unrelated complexity.

If some_element not in some_set evaluates false, one of the preconditions I mentioned above must not be true—i.e. either some_set is not a collection, or some_element and/or the elements of some_set don’t in fact evaluate equal when you expect them to. Alternatively, the if block may not be evaluating true, but there is another unrelated reason why you are not getting the output you expect.

Either way, you can verify both of these with a print() statement, logging call or debugger, and these are the two critical, still-missing pieces we need to provide useful help here.

What does “looks good” mean, sorry?

As such, the critical thing we need to know is what exactly is the structure and content of technical_data_assets_set, and the output of result_list_Assets[ii]['domain'].get('id'). At a minimum, we need an example of the exact output returned by one problem call of result_list_Assets[ii]['domain'].get('id'), and the exact entry in the technical_data_assets_set that it should match, plus at least a snippit of the output of print(repr(technical_data_assets_set)).

Again, the other possible problem area relates to anything that happens between the if condition and the actual output that you observe that leads you to believe that this block is executing. While we could inspect that code, the easiest way to verify that the problem is with this specific block is with print() calls, logging messages, using a debugger, etc. to determine whether and when the block is executing, what are the exact inputs.

I apologize for not providing enough information.

“looks good” means that the information in that set is what I expect it to be. It contains a list of domain.ids. I am trying to see if result_list_Assets[ii]['domain'].get('id') value equals one of those in the set. If so, skip the processing and go to the next record on the loop.

I changed some code to retrieve a larger number of records and I am finding that some do have domain.ids which are in the set. They should have been ignored.

I am almost to the point of adding all the records to the database and using a SQL statement to delete those with domain.ids in the set.

I appreciate you taking time to look at. But, it appears that I have more work to do.

Michael said: “This is the code where I access the set.”

Your problem is not where you check for elements in the set.

if result_list_Assets[ii]['domain'].get('id') not in technical_data_assets_set:

and showing us that piece of code is of no help. Your problem is where the set is created, or modified after creation, and I don’t think you have shown us that.

If the set is not supposed to be modified after creation, you may find it helps to convert it to a frozenset so that any accidental modifications afterwards will raise an error.

Your original code appears to have already been indented two levels before we reached the code snippet you want to show. That hints at a lot of unseen complexity in this method. Consider refactoring more to reduce the complexity.

Unrelated to your technical_data_assets_set issue, I think (but have obviously not tried it!) you can simplify some of your code. You can simplify the code creating userParams2 (is there a userParams1 as well?) to this:

userParams2 = {'limit': 5000, 'offset': ii*1000}

and the code creating params (which appears to be unused) to this:

params = kwargs.copy()

If technical_data_assets_set contains elements you do not expect, you need to focus on the parts of your code that builds technical_data_assets_set. Hopefully you can refactor it out into a single method, rather than modify it all over the place.

I have printed out that set and it contains what I expect it to contain.

To confirm, you’ve done so at the line immediately prior to your if statement, correct? Otherwise, as @steven.daprano mentions, if you are not using a frozenset, it could be modified somewhere else after your print() but prior to being accessed to compare against.

If we assume your statement to imply that technical_data_assets_set is a set object with elements that are IDs with the exact values and data types that you expect (which, personally, I would not discount without verifying its contents), this sieves down the three possibilities to two. Either result_list_Assets[ii]['domain'].get('id') at the time you are running it is not returning objects with the identical type and value to what is included as top-level elements in the set, or this statement does not execute for the problem IDs, and the actual issue is not directly related to this at all.

Let me list if just prior to the testing.

print(technical_data_assets_set)
if result_list_Assets[ii][‘domain’].get(‘id’) not in technical_data_assets_set:
modified_dictionary = {‘id’: ‘’,

the print looks correct.

Okay, if you’re sure—personally, I’d never completely trust that there wasn’t something I was missing without having a second experience pair of eyes on it. If so, you now need to check the other two possibilities—printing result_list_Assets[ii][‘domain’].get(‘id’) and ensuring it exactly matches the values in your set, and checking when and on which values this block is firing.

This is just getting weirder…
Here is the code:

    for ii in range(10):
        userParams2 = {}
        userParams2['limit'] = 1000
        userParams2['offset'] = ii * 1000

        print(userParams2)

        params = {}
        for k, v in kwargs.items():
            params[k] = v
        collibraResponseAssets = requests.get(self.collibraRestURL + '/assets',
                                    auth=HTTPBasicAuth(self.username, self.password),
                                    params = userParams2)

        asset_data = create_response_tuple(collibraResponseAssets)
        if asset_data[0] != 200:
            messages.append('ERROR: Asset Data Collibra extract has encountered errors!')
            http_error(asset_data, messages, indent=indent1, debug=1)
            quit()
        result_list_Assets = asset_data[1].get("results")
        print(technical_data_assets_set)
        print(result_list_Assets[ii]['domain'].get('id'))
        if result_list_Assets[ii]['domain'].get('id') not in technical_data_assets_set:

Here is the results:
Total domain records: 79363
Total domain loops: 80
Total asset records: 513074
Total asset loops: 514
{‘limit’: 1000, ‘offset’: 0}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
4904d0e8-9758-4357-8001-d4254a0123d8
{‘limit’: 1000, ‘offset’: 1000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
c313f69e-7c94-4f3c-91b9-27502cd51836
{‘limit’: 1000, ‘offset’: 2000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
c313f69e-7c94-4f3c-91b9-27502cd51836
{‘limit’: 1000, ‘offset’: 3000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
30780083-7fec-42dd-a96e-a4c56745b689
{‘limit’: 1000, ‘offset’: 4000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
c313f69e-7c94-4f3c-91b9-27502cd51836
{‘limit’: 1000, ‘offset’: 5000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
c313f69e-7c94-4f3c-91b9-27502cd51836
{‘limit’: 1000, ‘offset’: 6000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
4cbeb366-7759-42c6-ab71-ceef6dac89a9
{‘limit’: 1000, ‘offset’: 7000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
c313f69e-7c94-4f3c-91b9-27502cd51836
{‘limit’: 1000, ‘offset’: 8000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
4cbeb366-7759-42c6-ab71-ceef6dac89a9
{‘limit’: 1000, ‘offset’: 9000}
{’’, ‘363c52e4-e123-4ad1-95f7-0b7e36ef14ed’, ‘d8c87b40-5db1-4ffe-88d2-2c4335700a44’, ‘b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c’, ‘1f2e03dd-3746-4ee5-9546-d4b9eff138fb’, ‘c9f607e6-769d-4b96-b2c1-17d3b7753cd8’, ‘3e38a220-3317-4b7d-84ed-94f7c5eb6b42’, ‘afc796e5-48ba-45a3-8e18-9f12034cce2b’, ‘879ce1a2-0ee5-4ca6-a0bb-fca5612ea829’, ‘f7a38884-fb95-4bd8-bce5-913826954a3e’, ‘8f413388-95bb-4699-8a59-e58e588b9723’, ‘30780083-7fec-42dd-a96e-a4c56745b689’, ‘6ce5207a-4dab-4094-8dc5-1e5543e2d515’, ‘8bbb0ba9-b5dc-46f9-b87c-adab6aeb710e’, ‘2a17cdd2-9154-4ced-9b19-8788d91e334e’, ‘c03c8c05-2bbe-48f6-9568-edc3826d2a8a’, ‘f2caee35-9b0b-4b7b-8054-3d1b520090e0’, ‘3a4c0cc8-84f9-4ebe-8740-fbcd3e79e31b’, ‘b01481bc-1858-4e83-a870-189dec1bbdb4’, ‘ab53c6fc-30eb-431d-b0ec-5bb489b5ab54’, ‘efc953e0-a6e4-4792-983d-68392697c10e’, ‘b8946e80-c138-461b-9f78-54b6f79553a4’}
b0ae8484-d259-4ff8-b645-fbbd9bb9fd9c

The data in {} is the “print(technical_data_assets_set)”
It is only printing 1 row from the “print(result_list_Assets[ii][‘domain’].get(‘id’))” But, it only prints 10 records. That must be because of this:

for ii in range(10):
userParams2 = {}
userParams2[‘limit’] = 1000
userParams2[‘offset’] = ii * 1000

But, it adds 1,000 records to the database. The “limit” prevents it adding more.

This is getting way too confusing… :stuck_out_tongue: