Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Richtpt
Helper I
Helper I

Trouble doing SELECT OPENROWSET from JSON Lines file due to file extension

I have a bunch of files that are JSON Lines files.  I have imported the files into a Lakehouse in the Files section.  The files all have a ".json" extension.  I'm trying to use the SQL Endpoint to select * from a file:

 

SELECT *
FROM OPENROWSET(BULK '/Files/Test1.json')

 

When I do this, I get 

Msg 15853, Level 16, State 20, Line 3
Invalid or unknown format type 'json'.

 

If I change the extension to ".jsonl" it works fine.  Is there a way to make this work with the ".json" extension?  I tried adding FORMAT="JSON" but that's not working, which could be me not understanding the syntax correctcly.

1 ACCEPTED SOLUTION
Richtpt
Helper I
Helper I

Found it.  I was using FORMAT = "JSON".  First, it should be single-quotes not double.  Second, it's JSONL.  So the syntax is OPENROWSET(BULK '/Files/Test1.json', FORMAT = 'JSONL').  

View solution in original post

1 REPLY 1
Richtpt
Helper I
Helper I

Found it.  I was using FORMAT = "JSON".  First, it should be single-quotes not double.  Second, it's JSONL.  So the syntax is OPENROWSET(BULK '/Files/Test1.json', FORMAT = 'JSONL').  

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.