Forum Discussion
Copy Data into a new Kusto table
- 1 year ago
I ended up replacing the original KQL activity with the following sequence:
- A Lookup activity to retrieve the schema of the incoming table
- A KQL activity to drop the table if it already exists
- A KQL activity to create an empty table
- A Copy Data activity to populate the table with content
While this approach isn't fully compliant—since not all activities are workspace identity (WI) based—it’s still an improvement over the previous setup. At least the activities that interact with external databases, namely Lookup and Copy Data, are WI-based.
Hi Jing1018
Apologies for the inconvenience, and thank you for raising these thoughtful follow-up questions.
We understand your concern regarding the undocumented nature of Web activity support for Managed Identity (MI) is valid. While the official Microsoft Fabric documentation currently lists only Copy, Lookup, and GetMetadata as MI-supported activities, it does not explicitly mention Web activity. In practice, however, Web activity can be configured to use MI if the authentication settings expose this option, the target endpoint accepts Azure AD tokens, and the Fabric workspace identity has been granted the necessary permissions. For example, the Kusto management endpoint ex: https://<cluster>.kusto.windows.net/v1/rest/mgmt natively accepts Azure AD tokens, so when configured correctly, the Web activity can securely execute commands such as .create table under MI. Because this capability is not yet formally documented, we recommend validating it in a controlled environment before adopting it widely.
Regarding schema flexibility when creating a Kusto table via Web activity, particularly in cases where the incoming data has dynamic or unknown structure, named ingestion mappings are indeed the recommended approach. These mappings define how incoming data fields map to the target table’s columns, enabling ingestion even when the source schema is variable. For instance, if a table is initially created with a generic column (such as a single string or dynamic type), a JSON ingestion mapping can be registered using the .create table ingestion mapping command. This mapping is then referenced during ingestion through the ingestionMappingReference property in the Copy Data activity. This approach ensures that even with a placeholder schema, incoming data can be ingested consistently and extended later as needed.
Regards,
Microsoft Fabric Community Support Team.