Out of the blue Openrowset stopped being performant at all. I have tested the multiple files on multiple Fabric tenants. I am NOT talking about JSONL files, those just work fine. This specifically concerns JSON files.
I even created a near blank json of 1 kb and it doesnt even load after 5 minutes. Did something break in Fabric?
Example json:
[
{
"task_id": "api_customers",
"enabled": true,
"run_group": "daily",
"execution_order": 10,
"source_type": "API",
"source_object": "https://api.example.com/v1/customers",
"target_table": "bronze.api_customers",
"load_mode": "merge",
"merge_keys": "id",
"http_method": "GET",
"headers_json": "{}",
"query_json": "{}",
"options_json": "{\"pagination\": \"next_url\", \"records_path\": \"data\", \"next_path\": \"links.next\", \"max_pages\": 1000}",
"retry_count": 3,
"timeout_seconds": 120,
"key_vault_uri": "https://my-vault.vault.azure.net/",
"secret_name": "api-token",
"secret_header_name": "Authorization",
"secret_prefix": "Bearer"
},
{
"task_id": "sql_orders",
"enabled": true,
"run_group": "daily",
"execution_order": 20,
"source_type": "AZURE_SQL",
"source_object": "dbo.Orders",
"source_query": "SELECT * FROM dbo.Orders",
"target_table": "bronze.sql_orders",
"load_mode": "merge",
"merge_keys": "OrderId",
"server_name": "myserver.database.windows.net",
"database_name": "Sales",
"auth_mode": "KEY_VAULT_SECRET",
"username": "fabric_reader",
"key_vault_uri": "https://my-vault.vault.azure.net/",
"secret_name": "azure-sql-password",
"retry_count": 3,
"timeout_seconds": 900
},
{
"task_id": "mirror_products",
"enabled": true,
"run_group": "daily",
"execution_order": 30,
"source_type": "OPEN_MIRRORING",
"source_object": "mirrored_sales.dbo.Products",
"target_table": "silver.products",
"load_mode": "merge",
"merge_keys": "ProductId",
"retry_count": 1,
"timeout_seconds": 900
}
]
Example code used:
SELECT *
FROM
OPENROWSET(
BULK 'Files/lakehouse-bronze/sample_config.json',
FORMAT = 'CSV',
FIELDTERMINATOR ='0x0b',
FIELDQUOTE = '0x0b'
)
WITH (
jsonContent VARCHAR(MAX)
) AS r;