Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
dineshkumarravi
Frequent Visitor

Copy Activity - Hash key generation and datatype issue using snowflake connector.

Hi Good morning Am using Copy activity copy the data from snowflake to lakehouse.
 
Snowflake structure
 
create or replace TABLE DB.TABLES.PRODUCT (
PRODUCTID VARCHAR(50),
PRODUCTNAME VARCHAR(100),
CATEGORY VARCHAR(50),
PRICE VARCHAR(50),
STOCKQUANTITY VARCHAR(50),
SUPPLIERID VARCHAR(50),
INSERTEDDATETIME VARCHAR(50),
UPDATEDDATETIME VARCHAR(50),
ISCURRENT BOOLEAN,
LOADDATETIME VARCHAR(50),
AD_INSERTDATETIME VARCHAR(50)
);
 
Lakehouse table sturucture
 
schema = StructType([
    StructField("PRODUCTID", StringType(), True),
    StructField("PRODUCTNAME", StringType(), True),
    StructField("CATEGORY", StringType(), True),
    StructField("PRICE", StringType(), True),
    StructField("STOCKQUANTITY", StringType(), True),
    StructField("SUPPLIERID", StringType(), True),
    StructField("INSERTEDDATETIME", StringType(), True),
    StructField("UPDATEDDATETIME", StringType(), True),
    StructField("ISCURRENT", StringType(), True),
StructField("HASHKEY", StringType(), True),
StructField("AD_INSERTDATETIME", StringType(), True),
])
 
Question 1
1. i create new table in in lakehouse using pyspark,only schema datatype StringType(), copy the data from snowflake to lakehouse,if i change the datatype empty dataset rows copied to lakehouse.is there anything have to do ?
 
Question 2
 
2. I need to create a new hashkey 
{
  "type": "TabularTranslator",
  "mappings": [
    {
      "source": { "name": "AD_INSERTDATETIME" },
      "sink": { "name": "AD_INSERTDATETIME" }
    },
    {
      "source": { "name": "ISCURRENT" },
      "sink": { "name": "ISCURRENT" }
    },
    {
      "source": { "name": "UPDATEDDATETIME" },
      "sink": { "name": "UPDATEDDATETIME" }
    },
    {
      "source": { "name": "INSERTEDDATETIME" },
      "sink": { "name": "INSERTEDDATETIME" }
    },
    {
      "source": { "name": "SUPPLIERID" },
      "sink": { "name": "SUPPLIERID" }
    },
    {
      "source": { "name": "STOCKQUANTITY" },
      "sink": { "name": "STOCKQUANTITY" }
    },
    {
      "source": { "name": "PRICE" },
      "sink": { "name": "PRICE" }
    },
    {
      "source": { "name": "CATEGORY" },
      "sink": { "name": "CATEGORY" }
    },
    {
      "source": { "name": "PRODUCTNAME" },
      "sink": { "name": "PRODUCTNAME" }
    },
    {
      "source": { "name": "PRODUCTID" },
      "sink": { "name": "PRODUCTID" }
    },
    {
      "source": { "name": "LOADDATETIME" },
      "sink": { "name": "LOADDATETIME" }
    },
    {
      "source": {
        "name": "HASHKEY",
        "expression": "HASH(CONCAT(PRODUCTID, PRODUCTNAME))"
      },
      "sink": {
        "name": "HASHKEY"
      }
    }
  ]
}
 
but its not work for me. if anything miss kindly let me know fix the above 2 isssues ?

 

3 REPLIES 3
v-kathullac
Community Support
Community Support

Hi @dineshkumarravi ,

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,

Chaithanya.

v-kathullac
Community Support
Community Support

Hi @dineshkumarravi ,

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,

Chaithanya.

Anonymous
Not applicable

Hi @dineshkumarravi 

 

Thank you for your question. You can go to the following link to ask your question. There are more professional engineers there to help you solve the problem:

 

Get Help with Data Warehouse - Microsoft Fabric Community

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Fabric Update Carousel

Fabric Monthly Update - August 2025

Check out the August 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.