need help
42 TopicsProblem to load file data into a table
Hello I am following the Microsoft learn path "Create a lakehouse" where is shows this easy step to create a table from an existing file : But I don't have this option when I click on the three dots next to the file : Do you know what am I missing? Thank you RaphaëlSolved2.8KViews0likes4Commentsuser data function in fabric
Hi I'm trying to run UDF funtion and integarting it with azure open ai. I'm getting the below error during invocation can someone please help? { "functionName": "AISuggestion", "invocationId": "00000000-0000-0000-0000-000000000000", "status": "Failed", "errors": [ { "errorCode": "WorkloadException", "subErrorCode": "NotFound", "message": "User data function: 'AISuggestion' invocation failed." } ] } My code ------------------------------------------------------------------------------------------ import fabric.functions as fn import logging import openai udf = fn.UserDataFunctions() @udf.connection(argName="sqlDB", alias="MyFabricSQLDB") @udf.function() def AISuggestion(sqlDB: fn.FabricSqlConnection, company: str) -> str: try: logging.info('Triggering AISuggestion function.') # Connect to SQL try: connection = sqlDB.connect() cursor = connection.cursor() except Exception as sql_conn_err: return f"SQL connection failed: {str(sql_conn_err)}" # Read company info try: cursor.execute("SELECT * FROM [dbo].[CompanyStatus] WHERE Company = ?", company) record = cursor.fetchone() if not record: return f"No record found for company: {company}" customer_name = record[0] last_comment = record[10] except Exception as query_err: return f"Error fetching company data: {str(query_err)}" # OpenAI Prompt prompt = ( "Respond with a short plan that is under 240 characters: I work at Contoso Outdoors, " "and we collaborate with influencers by offering them offers for custom designed bikes. " f"Pretend we want to collab with the following influencer: {customer_name} from company: {company}. " f"Here's a comment about their latest feedback: {last_comment}." ) # Call Azure OpenAI try: deployment = "gpt-35-turbo" # or gpt-35-turbo openai_client = openai.AzureOpenAI( api_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', api_version="2025-01-01-preview", azure_endpoint="https://azureopenxxxx.openai.azure.com/" ) response = openai_client.chat.completions.create( model=deployment, messages=[ {"role": "user", "content": prompt} ] ) result = response.choices[0].message.content except Exception as ai_err: return f"OpenAI call failed: {str(ai_err)}" # Write result to SQL try: cursor.execute("SELECT * FROM [dbo].[AISuggestions] WHERE Company = ?", company) if cursor.fetchone(): update_query = "UPDATE [dbo].[AISuggestions] SET [AI_suggestion] = ? WHERE [Company] = ?;" cursor.execute(update_query, (result, company)) else: insert_query = "INSERT INTO [dbo].[AISuggestions] (Name, Company, AI_suggestion) VALUES (?, ?, ?);" cursor.execute(insert_query, (customer_name, company, result)) connection.commit() except Exception as sql_write_err: return f"SQL insert/update failed: {str(sql_write_err)}" finally: cursor.close() connection.close() return f"Successfully generated suggestion for {customer_name} from {company}." except Exception as general_err: return f"Unhandled error: {str(general_err)}"Solved6.3KViews0likes14CommentsFabric compute capacity exceeded its limits. How to know how much CU each dataflowgen2 consumes
Our dataflowgen2 got Failed status after exceeding the Fabric compute capacity limit At the moment, I'm trying to access Fabric Capacity Metrics to see if it can be viewed there but cant open it as well with message "Unable to load model due to reaching capacity limits" - How to know how much CU each activity(dataflowgen2,notebook,etc) in a datapipeline consume so we can avoid hitting the CU limit? - Do we have other way to view fabric capacity metrics?Solved21KViews0likes7CommentsHow Git Integration with Fabric and only one GitHub Organization?
Today, my company has a GitHub organization, and we are starting to use Microsoft Fabric. I noticed that I can link a Fabric workspace to one of my personal repositories, but I would prefer that this doesn't happen. I would like to limit the interaction of Microsoft Fabric to my company's organization. Is that possible? How can I do it, and what references should I read to better understand this?4.2KViews1like5CommentsLackluster Data Warehouse performance
I am writing this because I am getting fed up with the ill performance of Datawarehouse. Here is my current setup: (External Data such as SQL, Sharepoint, and GA4) => (Dataflow Gen2) => (Data WareHouse) => (Dataset) => (Report) The issue lies with the data warehouse, it is without fail that once or twice a week I have to manually go and click the refresh button on my Dataset that points at the data warehouse because the connection to the warehouse failed or timed out. A simple click of the refresh and it's fine. That would be find except now, the performance on the warehouse just tanked. Now when I try to do a simple select top 1 (seq_no) from Table I tried to let it load for over 30 minutes and no results. I have lost all faith in data warehouses. I have also set up a data lake house in a different workspace and different project. This one is connected to a gen 2, and similar issues in the fact that without fail 1 or 2 times a week I have to go in and click the refresh button on the data set because it is unable to establish connection to the lake house. It works fine after that. For reference: Gateway is (3000.214.8) ( I know there is a new version, waiting on our network teams schedule to have it pushed, but this issue existed prior to the new release) Let me know if you need anymore details or if i should just open a ticket.Solved1.9KViews0likes3CommentsPushing data into warehouse
We have a user platform that fires a function to log every user action (button press) using JavaScript and currently saves this to Dataverse. This is not scalable and I would like this to be within a datawarehouse/lake for future manipulation/reporting. Is there a programatic way to directly create records in a fabric warehouse/lake ?Solved1.3KViews0likes3CommentsStarter pool limitation alternative workarounds
Starter pool limitation: Workspaces with managed virtual networks (VNets) can't access starter pools. This category encompasses workspaces that use managed private endpoints or are associated with a Fabric tenant enabled with Azure Private Links and have executed Spark jobs. Such workspaces rely on on-demand clusters, taking three to five minutes to start a session from mentioned article https://learn.microsoft.com/en-us/fabric/security/security-managed-private-endpoints-overview#limitations-and-considerations Is there any workaround or alternative for this ?What is a recommended best practice around Spark workloads?2.8KViews0likes4CommentsAppending Data to existing file in One Lake using APIs
Is it possible to append data to existing json file using One Lake (ADLS) APIs? I have been trying that using the standard ADLS APIs and getting the error - Am I missing something or is it not possible at all to append data to existing fil? The file is inside of a lakehouse.Solved4.1KViews0likes5CommentsNot able to connect keyvault in notebook in fabric
Hi Team, Hello Team, I am facing issue while connecting fabric with keyvault, getting below error client address is not authorized, and caller is not a trusted service.\r\nClient address: Earlier it was working fine, now started facing this.Please help Thanks2.5KViews0likes6Comments