<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Python combining Audit metrics data logs from each API call in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Python-combining-Audit-metrics-data-logs-from-each-API-call/m-p/1969169#M30615</link>
    <description>&lt;P&gt;When ever I make an API call I am getting below sample data. Due to API call limitations ican only return 5000 recors at a time. if I have 50000 records I have to make 10 calls with 5000 records in each call.&lt;BR /&gt;Now I want to combine all these records into a single dictionary and then export into a csv file.&lt;/P&gt;&lt;P&gt;Code I have tried and failed, since the below codes are updating records in one of the dictionaries if the value exist&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;pd1 = pd.DataFrame(data)&lt;BR /&gt;pd2 = pd.DataFrame(data_1)&lt;BR /&gt;print(pd1.append(pd2))&lt;/P&gt;&lt;P&gt;def Merge(dict1, dict2):&lt;BR /&gt;res = {**dict1, **dict2}&lt;BR /&gt;return res&lt;BR /&gt;&lt;BR /&gt;# Sample 2&lt;BR /&gt;dict1 = {'a': 10, 'b': 8}&lt;BR /&gt;dict2 = {'d': 6, 'c': 4}&lt;BR /&gt;dict3 = Merge(dict1, dict2)&lt;BR /&gt;print(dict3)&lt;/P&gt;&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;*{'@odata.context': '&lt;A href="http://wabi-us-north-central-f-primary-redirect.analysis.windows.net/v1.0/myorg/admin/$metadata#groups" target="_blank" rel="noopener"&gt;http://wabi-us-north-central-f-primary-redirect.analysis.windows.net/v1.0/myorg/admin/$metadata#groups&lt;/A&gt;', '@odata.count': 2754, 'value': [{'id': 'ABCDEF-EC21-ABCDFEG-A6F9-fsdafsadf', 'isReadOnly': False, 'isOnDedicatedCapacity': True, 'capacityId': 'sdfasdfasd-F3A6-gfda-dsafas-asdfasd', 'capacityMigrationStatus': 'Migrated', 'type': 'Workspace', 'state': 'Active', 'name': 'DSS Dev Workspace', 'datasets': [{'id': 'sdfas-3436-fasdfas-a377-dsfa', 'name': 'Net Revenue Reporting v2', 'addRowsAPIEnabled': False, 'configuredBy': 'asdf.fdsa@asdfgasdf.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2019-09-18T20:05:21.887Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}, {'id': 'e102e519-8fa1-4e2f-95b4-d6e0fa85960a', 'name': 'Month Stats Review (1)', 'addRowsAPIEnabled': False, 'configuredBy': 'fasd.fasd@afdsasd.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2020-02-28T21:27:09.147Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}]}]}*&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jul 2021 21:28:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-20T21:28:56Z</dc:date>
    <item>
      <title>Python combining Audit metrics data logs from each API call</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-combining-Audit-metrics-data-logs-from-each-API-call/m-p/1969169#M30615</link>
      <description>&lt;P&gt;When ever I make an API call I am getting below sample data. Due to API call limitations ican only return 5000 recors at a time. if I have 50000 records I have to make 10 calls with 5000 records in each call.&lt;BR /&gt;Now I want to combine all these records into a single dictionary and then export into a csv file.&lt;/P&gt;&lt;P&gt;Code I have tried and failed, since the below codes are updating records in one of the dictionaries if the value exist&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;pd1 = pd.DataFrame(data)&lt;BR /&gt;pd2 = pd.DataFrame(data_1)&lt;BR /&gt;print(pd1.append(pd2))&lt;/P&gt;&lt;P&gt;def Merge(dict1, dict2):&lt;BR /&gt;res = {**dict1, **dict2}&lt;BR /&gt;return res&lt;BR /&gt;&lt;BR /&gt;# Sample 2&lt;BR /&gt;dict1 = {'a': 10, 'b': 8}&lt;BR /&gt;dict2 = {'d': 6, 'c': 4}&lt;BR /&gt;dict3 = Merge(dict1, dict2)&lt;BR /&gt;print(dict3)&lt;/P&gt;&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;*{'@odata.context': '&lt;A href="http://wabi-us-north-central-f-primary-redirect.analysis.windows.net/v1.0/myorg/admin/$metadata#groups" target="_blank" rel="noopener"&gt;http://wabi-us-north-central-f-primary-redirect.analysis.windows.net/v1.0/myorg/admin/$metadata#groups&lt;/A&gt;', '@odata.count': 2754, 'value': [{'id': 'ABCDEF-EC21-ABCDFEG-A6F9-fsdafsadf', 'isReadOnly': False, 'isOnDedicatedCapacity': True, 'capacityId': 'sdfasdfasd-F3A6-gfda-dsafas-asdfasd', 'capacityMigrationStatus': 'Migrated', 'type': 'Workspace', 'state': 'Active', 'name': 'DSS Dev Workspace', 'datasets': [{'id': 'sdfas-3436-fasdfas-a377-dsfa', 'name': 'Net Revenue Reporting v2', 'addRowsAPIEnabled': False, 'configuredBy': 'asdf.fdsa@asdfgasdf.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2019-09-18T20:05:21.887Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}, {'id': 'e102e519-8fa1-4e2f-95b4-d6e0fa85960a', 'name': 'Month Stats Review (1)', 'addRowsAPIEnabled': False, 'configuredBy': 'fasd.fasd@afdsasd.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2020-02-28T21:27:09.147Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}]}]}*&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 21:28:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-combining-Audit-metrics-data-logs-from-each-API-call/m-p/1969169#M30615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-20T21:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python combining Audit metrics data logs from each API call</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-combining-Audit-metrics-data-logs-from-each-API-call/m-p/1975248#M30673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found some blogs, I hope they can help you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-in-query-editor" target="_self"&gt;Use Python in Power Query Editor&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/54977041/how-to-use-python-r-to-analyze-a-joined-table-in-power-bi" target="_self"&gt;How to use Python/R to analyze a joined table in Power BI?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 08:38:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-combining-Audit-metrics-data-logs-from-each-API-call/m-p/1975248#M30673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-23T08:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python combining Audit metrics data logs from each API call</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-combining-Audit-metrics-data-logs-from-each-API-call/m-p/2000648#M30932</link>
      <description>&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;I eneded up going one level down (value property) where the data is stored in list format. I have appended all data to a list and exported to txt file. As shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'value': [{'id': 'ABCDEF-EC21-ABCDFEG-A6F9-fsdafsadf', 'isReadOnly': False, 'isOnDedicatedCapacity': True, 'capacityId': 'sdfasdfasd-F3A6-gfda-dsafas-asdfasd', 'capacityMigrationStatus': 'Migrated', 'type': 'Workspace', 'state': 'Active', 'name': 'DSS Dev Workspace', 'datasets': [{'id': 'sdfas-3436-fasdfas-a377-dsfa', 'name': 'Net Revenue Reporting v2', 'addRowsAPIEnabled': False, 'configuredBy': 'asdf.fdsa@asdfgasdf.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2019-09-18T20:05:21.887Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}, {'id': 'e102e519-8fa1-4e2f-95b4-d6e0fa85960a', 'name': 'Month Stats Review (1)', 'addRowsAPIEnabled': False, 'configuredBy': 'fasd.fasd@afdsasd.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2020-02-28T21:27:09.147Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}]}]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 15:55:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-combining-Audit-metrics-data-logs-from-each-API-call/m-p/2000648#M30932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-05T15:55:50Z</dc:date>
    </item>
  </channel>
</rss>

