<?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 Re: reading json file without using RDD on fabric in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3954779#M2255</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for using Fabric Community.&lt;/P&gt;
&lt;P&gt;The best course of action is to open a support ticket and have our support team take a closer look at it.&lt;/P&gt;
&lt;P&gt;Please reach out to our support team so they can do a more thorough investigation on why this it is happening:&amp;nbsp;&lt;A href="https://support.fabric.microsoft.com/en-IN/support/" target="_blank" rel="noopener nofollow noreferrer"&gt;Link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After creating a Support ticket please provide the ticket number as it would help us to track for more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please let us know if you have any other queries.&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2024 10:53:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-28T10:53:36Z</dc:date>
    <item>
      <title>reading json file without using RDD on fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3952441#M2244</link>
      <description>&lt;P&gt;Hei,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since i am working with json-stat2 files, and after trying to handle it using only spark frataframes didnt work, I want to extract it in the traditional way using&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;pyjstat on python.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;First i need to read json file as a string og text. I tried&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import json

# Define the path to the JSON file
path = "your_path_here"

# Open the JSON file and read its content
with open(path1, "r") as file:
    content = file.read()

# Print the content of the JSON file
print(content)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i get an error that says no file is identified (&lt;SPAN&gt; No such file or directory:)&amp;nbsp;&lt;/SPAN&gt;on the given path.&lt;/P&gt;&lt;P&gt;But if I use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;json_data = sc.textFile(path1).first()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;with same path it works perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get several tables from&amp;nbsp;Norwegian Statistics bureau.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wanna try their API,&amp;nbsp; (you get an example below). My goal is to create temViews after changing from pandas to spark dataframe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;table_05327 = "https://data.ssb.no/api/v0/no/table/05327/"
query_05327 ={"query":[],"response":{"format":"json-stat2"}}
resultat = requests.post(table_05327, json = query_05327)
dataset = pyjstat.Dataset.read(resultat.text)
df = dataset.write('dataframe')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Usin native pyspark it seems impossibel to handle since original order of values and categories are changed due to maptype that dont preservs order in the structure of json.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 12:00:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3952441#M2244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-27T12:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: reading json file without using RDD on fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3954779#M2255</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for using Fabric Community.&lt;/P&gt;
&lt;P&gt;The best course of action is to open a support ticket and have our support team take a closer look at it.&lt;/P&gt;
&lt;P&gt;Please reach out to our support team so they can do a more thorough investigation on why this it is happening:&amp;nbsp;&lt;A href="https://support.fabric.microsoft.com/en-IN/support/" target="_blank" rel="noopener nofollow noreferrer"&gt;Link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After creating a Support ticket please provide the ticket number as it would help us to track for more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please let us know if you have any other queries.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 10:53:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3954779#M2255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-28T10:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: reading json file without using RDD on fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3955846#M2267</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Where are your files stored ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 19:25:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3955846#M2267</guid>
      <dc:creator>michalikmaciek</dc:creator>
      <dc:date>2024-05-28T19:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: reading json file without using RDD on fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3958211#M2296</link>
      <description>&lt;P&gt;on the lakehouse &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 13:39:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3958211#M2296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-29T13:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: reading json file without using RDD on fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3961769#M2325</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;We haven’t heard from you on the last response and was just checking back to see if you got a chance to create support ticket. If yes please share the details here. Otherwise, will respond back with the more details and we will try to help. &lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 16:15:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3961769#M2325</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-30T16:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: reading json file without using RDD on fabric</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3961966#M2334</link>
      <description>&lt;P&gt;Hi and thanks foryour reply. I did not manage "with open...." syntax to work, but since i found a workaround I did not create a asupport tickect. Thanks again for your assistance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 18:21:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/reading-json-file-without-using-RDD-on-fabric/m-p/3961966#M2334</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-30T18:21:37Z</dc:date>
    </item>
  </channel>
</rss>

