-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
921a988
commit 18b1f3f
Showing
2 changed files
with
158 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const { processWarehouseMessage } = require('../../../warehouse'); | ||
|
||
const provider = 'snowflake'; | ||
|
||
function getDataTypeOverride(key, val, options, jsonKey = false) { | ||
if (key === 'violationErrors' || jsonKey) { | ||
return 'json'; | ||
} | ||
return 'string'; | ||
} | ||
|
||
function process(event) { | ||
const whSchemaVersion = event.request.query.whSchemaVersion || 'v1'; | ||
const whIDResolve = event.request.query.whIDResolve === 'true' || false; | ||
const whStoreEvent = event.destination.Config.storeFullEvent === true; | ||
const destJsonPaths = event.destination?.Config?.jsonPaths || ''; | ||
return processWarehouseMessage(event.message, { | ||
metadata: event.metadata, | ||
whSchemaVersion, | ||
whStoreEvent, | ||
whIDResolve, | ||
getDataTypeOverride, | ||
provider, | ||
sourceCategory: event.metadata ? event.metadata.sourceCategory : null, | ||
destJsonPaths, | ||
destConfig: event.destination?.Config, | ||
}); | ||
} | ||
|
||
module.exports = { | ||
provider, | ||
process, | ||
getDataTypeOverride, | ||
}; |
Oops, something went wrong.