-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FAI-14745] Process source airbyte connector output #102
Conversation
// Take the non-default value if provided with `srcOutputFile` option | ||
srcOutputFile: cliOptions.srcOnly ? '/dev/null' : cliOptions.srcOutputFile, | ||
srcOutputFile: cliOptions.srcOnly ? OutputStream.STDOUT : cliOptions.srcOutputFile, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug. this is supposed to be stdout by default
const lines = buffer.split('\n'); | ||
buffer = lines.pop() ?? ''; | ||
lines.forEach((line: string) => { | ||
processSrcDataByLine(line, srcOutputStream, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
processing the data and write to stdout/file instead of returning the data at the end of the function
if (cfg.rawMessages) { | ||
process.stdout.write(`${line}\n`); | ||
} else { | ||
logger.info(formatSrcMsg(data)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// - input stream: read from the data file user provided | ||
// - output stream: write to an intermediate file. Overwrite the file if it exists, otherwise create a new one | ||
const inputStream = createReadStream(cfg.srcInputFile!); | ||
const outputStream = createWriteStream(`${tmpDir}/${SRC_OUTPUT_DATA_FILE}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the user has srcInputFile
configured, i assume they won't have src-only
or src-output-file
configured. but i will add this constraint in the command in another PR.
Quality Gate failedFailed conditions |
Description
Type of change