Forum Discussion

SimonDalecky's avatar
SimonDalecky
Frequent Visitor
2 years ago
Solved

Copy activity into Lakehouse with schemas enabled

Hi, I am trying to understand, if I do anything wrong, or there is a actuall issue/bug in Copy Activity in Fabric.

 

I am trying to copy a table where source is on-premise SQL Server 2019 and a target destination is a Fabric Lakehouse with enabled schemas (preview feature).

 

Expected behaviour: In the target lakehouse and schema will get created new managed table based on name specified in copy activity.

Actual behaviour: Schema argument is ignored by copy activity. It creates a schema based on table name and no managed table gets created.

 

Image of copy activity setup

Copy activity json

{
    "source": {
        "type": "SqlServerSource",
        "queryTimeout": "02:00:00",
        "partitionOption": "None",
        "datasetSettings": {
            "annotations": [],
            "type": "SqlServerTable",
            "schema": [],
            "typeProperties": {
                "schema": "XXXX",
                "table": "XXXX",
                "database": "XXXX"
            },
            "externalReferences": {
                "connection": "XXXX"
            }
        }
    },
    "sink": {
        "type": "LakehouseTableSink",
        "tableActionOption": "Append",
        "partitionOption": "None",
        "datasetSettings": {
            "annotations": [],
            "linkedService": {
                "name": "flhBronzeDWHgeneralSimon",
                "properties": {
                    "annotations": [],
                    "type": "Lakehouse",
                    "typeProperties": {
                        "workspaceId": "XXXX",
                        "artifactId": "XXXX",
                        "rootFolder": "Tables"
                    }
                }
            },
            "type": "LakehouseTable",
            "schema": [],
            "typeProperties": {
                "schema": "dbo",
                "table": "TestTable"
            }
        }
    },
    "enableStaging": false,
    "translator": {
        "type": "TabularTranslator",
        "typeConversion": true,
        "typeConversionSettings": {
            "allowDataTruncation": true,
            "treatBooleanAsNumber": false
        }
    }
}

 

And here what gets created inside the Lakehouse

 

Many thanks for any assitance. 

 

 

5 Replies