Skip to content

Instantly share code, notes, and snippets.

@lcr95
Created October 9, 2021 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lcr95/5da2850c23650448256bce18d3b4b321 to your computer and use it in GitHub Desktop.
Save lcr95/5da2850c23650448256bce18d3b4b321 to your computer and use it in GitHub Desktop.
Sample Druid Spec
{
"type": "index_parallel",
"spec": {
"ioConfig": {
"type": "index_parallel",
"inputSource": {
"type": "inline",
"data": "sourceId,customerNo,accountNo,cardNo,transactionDatetime,transactionAmount,staffId,transactionDescription,currencyCode,countryCode,branchNo,currentLedgerBalance,availableBalance,chequeSerialNo,toAccountNo,sourceOfCash,transactionTypeCode\nfb152863-19f9-4e72-a0e5-efe08b4d7662,9.45341E+24,9.45341E+24,3.76074E+15,2021-10-09T00:00:00Z,14352.14,S3537,Sing where guess six clear region.,AUD,AU,B69,34239.49,3699.86,811553,9.45341E+24,Sing where guess six clear region.,WDL\n4d629d8e-730a-421b-9e1a-2a28eac89a54,7.69539E+24,7.69539E+24,3.76073E+15,2021-10-09T02:24:00Z,24279.5,B6581,Clearly focus either Mr see among need too.,AUD,SL,B83,16136.86,41190.12,159017,7.69539E+24,Clearly focus either Mr see among need too.,15\n8ebefb28-ca7c-4950-9abd-6d6f930cc0a1,7.69539E+24,7.69539E+24,3.76074E+15,2021-10-09T04:48:00Z,13523.41,E6949,Clearly focus either Mr see among need too.,AUD,NZ,B42,3456.15,4412.1,494953,7.69539E+24,Clearly focus either Mr see among need too.,TYPE037\n"
},
"inputFormat": {
"type": "csv",
"findColumnsFromHeader": true
}
},
"tuningConfig": {
"type": "index_parallel",
"partitionsSpec": {
"type": "dynamic"
}
},
"dataSchema": {
"dataSource": "card_data",
"timestampSpec": {
"column": "transactionDatetime",
"format": "iso"
},
"dimensionsSpec": {
"dimensions": [
{
"type": "string",
"name": "accountNo"
},
{
"type": "double",
"name": "availableBalance"
},
"branchNo",
{
"type": "long",
"name": "cardNo"
},
{
"type": "long",
"name": "chequeSerialNo"
},
"countryCode",
"currencyCode",
{
"type": "double",
"name": "currentLedgerBalance"
},
{
"type": "long",
"name": "customerNo"
},
"sourceId",
"sourceOfCash",
"staffId",
{
"type": "string",
"name": "toAccountNo"
},
{
"type": "double",
"name": "transactionAmount"
},
"transactionDescription",
"transactionTypeCode"
]
},
"granularitySpec": {
"queryGranularity": "none",
"rollup": false,
"segmentGranularity": "day"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment