<?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 Spark Connector for Data Warehouse - Fails with FabricSparkTDSHttpFailure 429 in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4393745#M6903</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to use synapse spark connector&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/spark-data-warehouse-connector" target="_blank" rel="noopener nofollow ugc"&gt;https://learn.microsoft.com/en-us/fabric/data-engineering/spark-data-warehouse-connector&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have some TSQL queries that we are executing in parallel. Previously those queries were written in spark sql. Now we would like to use tsql with the connector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But after some queries run I get this errors: `&lt;STRONG&gt;An error occurred while calling o55682.synapsesql.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;: com.microsoft.spark.fabric.tds.error.FabricSparkTDSHttpFailure: Artifact ID inquiry attempt failed with error code 429. Request Id - .`&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there some limitation on how many queries we can run in the session? And how to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2025 07:41:59 GMT</pubDate>
    <dc:creator>gregahren</dc:creator>
    <dc:date>2025-02-04T07:41:59Z</dc:date>
    <item>
      <title>Spark Connector for Data Warehouse - Fails with FabricSparkTDSHttpFailure 429</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4393745#M6903</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to use synapse spark connector&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/spark-data-warehouse-connector" target="_blank" rel="noopener nofollow ugc"&gt;https://learn.microsoft.com/en-us/fabric/data-engineering/spark-data-warehouse-connector&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have some TSQL queries that we are executing in parallel. Previously those queries were written in spark sql. Now we would like to use tsql with the connector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But after some queries run I get this errors: `&lt;STRONG&gt;An error occurred while calling o55682.synapsesql.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;: com.microsoft.spark.fabric.tds.error.FabricSparkTDSHttpFailure: Artifact ID inquiry attempt failed with error code 429. Request Id - .`&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there some limitation on how many queries we can run in the session? And how to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 07:41:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4393745#M6903</guid>
      <dc:creator>gregahren</dc:creator>
      <dc:date>2025-02-04T07:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Connector for Data Warehouse - Fails with FabricSparkTDSHttpFailure 429</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394129#M6912</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="669325" data-lia-user-login="gregahren" class="lia-mention lia-mention-user"&gt;gregahren&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please share more details about the usecase.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 10:35:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394129#M6912</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-02-04T10:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Connector for Data Warehouse - Fails with FabricSparkTDSHttpFailure 429</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394203#M6914</link>
      <description>&lt;P&gt;Yes of course.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are running some queries in parallel threads when processing our data, which works for sparks sql, when for tsql it throws 429 errors. I quickly added an example you can run in notebook so you can see where the issue is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import com.microsoft.spark.fabric
from com.microsoft.spark.fabric.Constants import Constants
from concurrent.futures import ThreadPoolExecutor

WORKSPACE_ID = "your_workspace_id"
LAKEHOUSE_NAME = "lakehouse_name"

def run_spark_multiple_threads(
    target_function, args_list, number_of_threads = 8
):
    with ThreadPoolExecutor(number_of_threads) as pool:
        futures = [pool.submit(target_function, *args) for args in args_list]
        results = [future.result() for future in futures]

    return results

def run_tsql(i):
    df = (
                        spark.read.option(
                            Constants.WorkspaceId,
                            WORKSPACE_ID,
                        )
                        .option(
                            Constants.DatabaseName,
                            LAKEHOUSE_NAME,
                        )
                        .synapsesql("""SELECT 1 as Temp""")
                    )
    print(i, df.count())

def run_sparksql(i):
    df = spark.sql("""SELECT 1 as Temp""")
    print(i, df.count())


run_spark_multiple_threads(
                run_sparksql,
                [(i,) for i in range(100)],
                number_of_threads=8
            )
print("done with spark sql")

run_spark_multiple_threads(
                run_tsql,
                [(i,) for i in range(100)],
                number_of_threads=8
            )
print("done with tsql")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here you will see that spark sql finishes normally for 100 queries, when tsql stops working after 50 or some queries. I believe there is rate limit 50req/50sec set, but its not mentioned in limitations of Spark connector for Microsoft Fabric Data Warehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need more info still please let me know.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 11:43:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394203#M6914</guid>
      <dc:creator>gregahren</dc:creator>
      <dc:date>2025-02-04T11:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Connector for Data Warehouse - Fails with FabricSparkTDSHttpFailure 429</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394328#M6915</link>
      <description>&lt;P&gt;Thanks for sharing the details&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="669325" data-lia-user-login="gregahren" class="lia-mention lia-mention-user"&gt;gregahren&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which F SKU you are on?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are my thoughts&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SQL analytics endpoint (used for T‑SQL queries) in Fabric Data Warehouse imposes throttling rules (or smoothing policies) that can lead to errors like 429 when too many requests are submitted concurrently over a short period. This mechanism is intended to manage resource saturation during peak usage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;• While it appears your workload exceeds an unofficial threshold (around 50 requests per 50 seconds), this limit isn’t formally documented as a “50req/50sec” rule. Instead, it’s part of the broader “compute capacity smoothing and throttling” policies that control background operations and ask users to manage concurrency when using T‑SQL via the connector&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/bs-latn-ba/fabric/data-warehouse/compute-capacity-smoothing-throttling" target="_blank"&gt;https://learn.microsoft.com/bs-latn-ba/fabric/data-warehouse/compute-capacity-smoothing-throttling&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this is helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if yes please accept the answer&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 12:22:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394328#M6915</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-02-04T12:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Connector for Data Warehouse - Fails with FabricSparkTDSHttpFailure 429</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394402#M6917</link>
      <description>&lt;P&gt;Thank you for your answer, I guess we will just have to take those limits into account.&lt;/P&gt;&lt;P&gt;We are on F4 capacity currently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your quick answer again!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 12:45:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394402#M6917</guid>
      <dc:creator>gregahren</dc:creator>
      <dc:date>2025-02-04T12:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Connector for Data Warehouse - Fails with FabricSparkTDSHttpFailure 429</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394404#M6918</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="669325" data-lia-user-login="gregahren" class="lia-mention lia-mention-user"&gt;gregahren&lt;/a&gt;&amp;nbsp;Glad it was helpful. Could you please accept the solution as this will be beneficial for community to find the right information quickly&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 12:48:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-Connector-for-Data-Warehouse-Fails-with/m-p/4394404#M6918</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-02-04T12:48:32Z</dc:date>
    </item>
  </channel>
</rss>

