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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

June Fabric Update Carousel

Fabric Monthly Update - June 2026

Check out the June 2026 Fabric update to learn about new features.

Top Solution Authors