Snowflake data source API reference guide
curl \
--request POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--data @example-payload.json \
https://demo.immuta.com/snowflake/handler{
"handler": {
"metadata": {
"ssl": true,
"userFiles": [],
"authenticationMethod": "userPassword",
"username": "user",
"password": "yourpassword",
"port": 443,
"hostname": "demo.us-east-1.snowflakecomputing.com",
"warehouse": "YOUR_WH",
"database": "ANALYTICS",
"schema": "TEST",
"table": "CUSTOMERS",
"nativeViewName": "customers_immuta",
"nativeSchemaName": "test_immuta",
"nativeWorkspaceName": "immuta_analytics",
"schemaProjectName": "Test",
"bodataSchemaName": "test",
"columns": [{
"name": "CUSTOMER_ID",
"dataType": "numeric(38,0)",
"remoteType": "number(38,0)",
"isPrimaryKey": false,
"nullable": true
}, {
"name": "FIRST_NAME",
"dataType": "text",
"remoteType": "varchar(16777216)",
"isPrimaryKey": false,
"nullable": true
}, {
"name": "LAST_NAME",
"dataType": "text",
"remoteType": "varchar(16777216)",
"isPrimaryKey": false,
"nullable": true
}, {
"name": "FIRST_ORDER",
"dataType": "date",
"remoteType": "date",
"isPrimaryKey": false,
"nullable": true
}, {
"name": "MOST_RECENT_ORDER",
"dataType": "date",
"remoteType": "date",
"isPrimaryKey": false,
"nullable": true
}, {
"name": "NUMBER_OF_ORDERS",
"dataType": "numeric(18,0)",
"remoteType": "number(18,0)",
"isPrimaryKey": false,
"nullable": true
}, {
"name": "TOTAL_ORDER_AMOUNT",
"dataType": "numeric",
"remoteType": "number(38,6)",
"isPrimaryKey": false,
"nullable": true
}],
"eventTime": "FIRST_ORDER",
"staleDataTolerance": 86400,
"bodataTableName": "customers",
"dataSourceName": "Customers"
}
},
"dataSource": {
"blobHandler": {
"scheme": "https",
"url": ""
},
"blobHandlerType": "Snowflake",
"recordFormat": "",
"type": "queryable",
"schemaEvolutionId": null,
"columnEvolutionEnabled": true,
"name": "Customers",
"sqlTableName": "customers"
},
"schemaEvolution": {
"ownerProfileId": 2,
"config": {
"nameTemplate": {
"nameFormat": "<Schema> <Tablename>",
"tableFormat": "<tablename>",
"sqlSchemaNameFormat": "<schema>",
"schemaProjectNameFormat": "<Schema>"
}
},
"schemas": []
}
}{
"id": 30,
"dataSourceId": 30,
"warnings": []
}curl \
--request GET \
--header "Content-Type: application/json" \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
https://demo.immuta.com/snowflake/handler/30{
"dataSourceId": 30,
"metadata": {
"ssl": true,
"port": 443,
"query": null,
"table": "CUSTOMERS",
"schema": "TEST",
"database": "ANALYTICS",
"hostname": "demo.us-east-1.snowflakecomputing.com",
"username": "user",
"eventTime": "FIRST_ORDER",
"userFiles": [],
"warehouse": "YOUR_WH",
"dataSourceName": "Customers",
"bodataTableName": "customers",
"highCardinality": "CUSTOMER_ID",
"bodataSchemaName": "test",
"columnsNormalized": true,
"schemaProjectName": "Test",
"staleDataTolerance": 86400,
"authenticationMethod": "userPassword"
},
"type": "queryable",
"connectionString": "[email protected]:443/ANALYTICS",
"id": 30,
"createdAt": "2021-10-01T16:19:23.562Z",
"updatedAt": "2021-10-01T16:19:28.556Z",
"dbms": {
"name": "snowflake"
}
}curl \
--request PUT \
--header "Content-Type: application/json" \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--data @example-payload.json \
https://demo.immuta.com/snowflake/handler/30{
"handler": {
"policyHandler": null,
"dataSourceId": 30,
"metadata": {
"ssl": true,
"port": 443,
"table": "CUSTOMERS",
"schema": "TEST",
"database": "ANALYTICS",
"hostname": "demo.us-east-1.snowflakecomputing.com",
"username": "user",
"eventTime": "MOST_RECENT_ORDER",
"userFiles": [],
"warehouse": "YOUR_WH",
"dataSourceName": "Customers",
"bodataTableName": "customers",
"highCardinality": "CUSTOMER_ID",
"bodataSchemaName": "test",
"columnsNormalized": true,
"schemaProjectName": "Test",
"staleDataTolerance": 86400,
"authenticationMethod": "userPassword",
"columns": [{
"name": "CUSTOMER_ID",
"dataType": "numeric(38,0)",
"nullable": true,
"remoteType": "number(38,0)",
"isPrimaryKey": false,
"remoteColumn": "CUSTOMER_ID"
}, {
"name": "FIRST_NAME",
"dataType": "text",
"nullable": true,
"remoteType": "varchar(16777216)",
"isPrimaryKey": false,
"remoteColumn": "FIRST_NAME"
}, {
"name": "LAST_NAME",
"dataType": "text",
"nullable": true,
"remoteType": "varchar(16777216)",
"isPrimaryKey": false,
"remoteColumn": "LAST_NAME"
}, {
"name": "FIRST_ORDER",
"dataType": "date",
"nullable": true,
"remoteType": "date",
"isPrimaryKey": false,
"remoteColumn": "FIRST_ORDER"
}, {
"name": "MOST_RECENT_ORDER",
"dataType": "date",
"nullable": true,
"remoteType": "date",
"isPrimaryKey": false,
"remoteColumn": "MOST_RECENT_ORDER"
}, {
"name": "NUMBER_OF_ORDERS",
"dataType": "numeric(18,0)",
"nullable": true,
"remoteType": "number(18,0)",
"isPrimaryKey": false,
"remoteColumn": "NUMBER_OF_ORDERS"
}, {
"name": "TOTAL_ORDER_AMOUNT",
"dataType": "numeric",
"nullable": true,
"remoteType": "number(38,6)",
"isPrimaryKey": false,
"remoteColumn": "TOTAL_ORDER_AMOUNT"
}]
},
"type": "queryable",
"connectionString": "[email protected]:443/ANALYTICS",
"id": 30,
"createdAt": "2021-10-01T16:19:23.562Z",
"updatedAt": "2021-10-01T17:19:35.853Z",
"dbms": {
"name": "snowflake"
}
}
}{
"id": 30,
"ca": ["-----BEGIN CERTIFICATE-----\ncertificatedata\n-----END CERTIFICATE-----"],
"metadata": {
"columns": [{
"name": "customer_id",
"dataType": "numeric(38,0)",
"remoteType": "number(38,0)",
"isPrimaryKey": false,
"nullable": true,
"remoteColumn": "CUSTOMER_ID"
}, {
"name": "first_name",
"dataType": "text",
"remoteType": "varchar(16777216)",
"isPrimaryKey": false,
"nullable": true,
"remoteColumn": "FIRST_NAME"
}, {
"name": "last_name",
"dataType": "text",
"remoteType": "varchar(16777216)",
"isPrimaryKey": false,
"nullable": true,
"remoteColumn": "LAST_NAME"
}, {
"name": "first_order",
"dataType": "date",
"remoteType": "date",
"isPrimaryKey": false,
"nullable": true,
"remoteColumn": "FIRST_ORDER"
}, {
"name": "most_recent_order",
"dataType": "date",
"remoteType": "date",
"isPrimaryKey": false,
"nullable": true,
"remoteColumn": "MOST_RECENT_ORDER"
}, {
"name": "number_of_orders",
"dataType": "numeric(18,0)",
"remoteType": "number(18,0)",
"isPrimaryKey": false,
"nullable": true,
"remoteColumn": "NUMBER_OF_ORDERS"
}, {
"name": "total_order_amount",
"dataType": "numeric",
"remoteType": "number(38,6)",
"isPrimaryKey": false,
"nullable": true,
"remoteColumn": "TOTAL_ORDER_AMOUNT"
}]
}
}curl \
--request PUT \
--header "Content-Type: application/json" \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--data @example-payload.json \
https://demo.immuta.com/snowflake/bulk{
"handler": {
"metadata": {
"ssl": true,
"port": 443,
"database": "ANALYST_DEMO",
"hostname": "demo.us-east-1.snowflakecomputing.com",
"username": "yourusername",
"userFiles": [],
"warehouse": "YOUR_WH",
"authenticationMethod": "userPassword",
"password": "yourpassword"
}
},
"connectionString": "demo.us-east-1.snowflakecomputing.com:443/ANALYST_DEMO"
}{
"bulkId": "bulk_ds_update_54ada6bhashedvaluea0c80cecd9d62",
"jobsCreated": 5
}curl \
--request PUT \
--header "Content-Type: application/json" \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
https://demo.immuta.com/snowflake/handler/30/triggerHighCardinalityJobc12fd320-22d8-11ec-b2b8-874838eeef05