Compare commits

..
14 Commits
Author SHA1 Message Date
forge-recovery b8388b82d5 Merge pull request 'ci: add the QRun release caller' (#23) from ci-qrun-release-caller-main-v1 into main
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / head-profile (push) Skipped
QRun-IO/ci-policy: ci / application-template-0 (push) Skipped
QRun-IO/ci-policy: ci / gradle-1 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (push) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (push) Skipped
QRun-IO/ci-policy: ci / node-9 (push) Skipped
QRun-IO/ci-policy: ci / source-config-14 (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: ci / node-8 (push) Skipped
QRun-IO/ci-policy: ci / node-10 (push) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (push) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (push) Skipped
QRun-IO/ci-policy: ci / source-config-13 (push) Skipped
QRun-IO/ci-policy: native / fork-deny (push) Skipped
QRun-IO/ci-policy: native / dotnet-0 (push) Skipped
QRun-IO/ci-policy: Shared Java Maven CI / verify (push) Successful in 1m8s
QRun-IO/ci-policy: ci / repository-policy (push) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (push) Skipped
QRun-IO/ci-policy: native / native-result (push) Successful in 5s
QRun-IO/ci-policy: Shared Java Maven CI / secrets (push) Successful in 17s
QRun-IO/ci-policy: Shared Java Maven CI / gate (push) Successful in 8s
QRun-IO/ci-policy: ci / java-maven-7 (push) Successful in 1m36s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 3s
Shared Java Maven CI / gate (push) Successful in 9s
qrun-release / release (push) Successful in 5m51s
Shared Java Maven CI / secrets (push) Successful in 14s
Shared Java Maven CI / verify (push) Successful in 1m6s
2026-11-02 10:50:52 +00:00
28c1471985 ci: move the QRun release caller to the thin v2 contract
Shared Java Maven CI / gate (push) Canceled after 0s
qrun-release / release (push) Canceled after 22m6s
QRun-IO/ci-policy: ci / java-docker-2 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-9 (pull_request) Skipped
Shared Java Maven CI / secrets (push) Successful in 14s
Shared Java Maven CI / verify (push) Successful in 1m14s
QRun-IO/ci-policy: ci / java-maven-4 (pull_request) Canceled after 21m48s
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: Shared Java Maven CI / secrets (pull_request) Successful in 23s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 5s
QRun-IO/ci-policy: Shared Java Maven CI / verify (pull_request) Successful in 1m26s
QRun-IO/ci-policy: Shared Java Maven CI / gate (pull_request) Successful in 12s
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Successful in 2m2s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 4s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 06:21:03 +00:00
forge-recoveryandCodex e7b78a38fc ci: add the identical QRun release caller
QRun-IO/ci-policy: ci / ci-result (pull_request) Failing after 1s
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-2 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: Shared Java Maven CI / verify (pull_request) Failing after 1s
QRun-IO/ci-policy: Shared Java Maven CI / secrets (pull_request) Failing after 0s
QRun-IO/ci-policy: Shared Java Maven CI / gate (pull_request) Failing after 11s
QRun-IO/ci-policy: ci / java-maven-4 (pull_request) Failing after 1m47s
Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 04:14:57 +00:00
james.maesandCodex a82f81d7f3 ci: skip unused browser installation for SFTP tests (#21)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 20:10:50 -05:00
james.maesandCodex 95e491a138 ci: enroll in the shared QQQ orb (#20)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 19:54:31 -05:00
james.maesandCodex 95cf4057e0 ci: use shared orb pipelines and source scanning (#16)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 10:40:26 -05:00
james.maes 7fd2506728 chore: migrate license from AGPL-3.0 to Apache-2.0 2026-01-05 10:14:22 -06:00
james.maes 0eaabea77f docs: update README with correct group ID and version 2025-12-28 16:44:02 -06:00
CircleCI 1cf0e41581 Bump version to 0.3.0 [skip ci] 2025-12-28 22:37:37 +00:00
james.maes a53e9b9e7b feat: Java 21 LTS migration with qbit-build-parent 1.5.0 (#2)
* feat: migrate to Java 21 with qbit-build-parent 1.5.0

* fix: update qbit-build-parent to 1.5.1 for JUnit 6 compatibility

* chore: retrigger CI after Maven Central sync
2025-12-28 16:36:05 -06:00
james.maes d3dbcaf768 docs: Standardize README 2025-12-24 14:18:57 -06:00
james.maes 05b931b150 ci: Add GitHub release configuration 2025-12-24 12:44:22 -06:00
CircleCI efc922bf0f Bump version to v0.2.1 [skip ci] 2025-09-16 21:53:02 +00:00
james.maes c68317c53b chore: Updated to meet requirements for maven central and qqq-orb 2025-09-16 16:52:10 -05:00
9 changed files with 425 additions and 247 deletions

No files matched your search

+10 -53
View File
@@ -1,57 +1,14 @@
version: 2.1
setup: true
orbs:
qqq-orb: kingsrook/qqq-orb@0.3.5
qqq-orb: kingsrook/qqq-orb@0.8
workflows:
test_only:
setup:
jobs:
- qqq-orb/mvn_test_only:
context: [ qqq-maven-registry-credentials ]
filters:
branches:
ignore: /(develop|main|release/.*|hotfix/.*|integration.*)/
tags:
only: []
publish_snapshot:
jobs:
- qqq-orb/mvn_publish:
context: [ qqq-maven-registry-credentials ]
branch_type: snapshot
filters:
branches:
only:
- develop
publish_release_candidate:
jobs:
- qqq-orb/mvn_publish:
context: [ qqq-maven-registry-credentials ]
branch_type: release_candidate
filters:
branches:
only:
- /release\/.*/
publish_release:
jobs:
- qqq-orb/mvn_publish:
context: [ qqq-maven-registry-credentials ]
branch_type: release
filters:
branches:
only: [ main ]
tags:
only: [ /v.*/ ]
publish_hotfix_release:
jobs:
- qqq-orb/mvn_publish:
context: [ qqq-maven-registry-credentials ]
branch_type: hotfix
filters:
branches:
only:
- /hotfix\/.*/
- qqq-orb/generate_pipeline:
orb_version: '0.8'
filters:
branches:
ignore: automation/qbit-rc-pending
tags:
only: /v.*/
+13
View File
@@ -0,0 +1,13 @@
# Standard QRun release caller (v2, thin contract): every push and manual dispatch delegates to the protected qrun-release-v1 channel. Do not edit per repository.
name: qrun-release
on:
push: {}
workflow_dispatch: {}
permissions:
contents: read
actions: read
jobs:
release:
uses: self:KofTwentyTwo/platform-ci/.gitea/workflows/java-maven.yaml@qrun-release-v1
with:
runner: linux-small
+31
View File
@@ -0,0 +1,31 @@
# GitHub Release Configuration
# Auto-generates release notes from PR labels
changelog:
exclude:
labels:
- ignore-for-release
- duplicate
- invalid
authors:
- dependabot
- dependabot[bot]
categories:
- title: Breaking Changes
labels:
- breaking-change
- breaking
- title: New Features
labels:
- enhancement
- feature
- title: Bug Fixes
labels:
- bug
- fix
- title: Dependencies
labels:
- dependencies
- title: Other Changes
labels:
- "*"
+23
View File
@@ -0,0 +1,23 @@
name: CodeQL
'on':
push:
branches:
- main
- develop
- release/**
- hotfix/**
pull_request: {}
schedule:
- cron: 41 16 * * 0
workflow_dispatch: {}
permissions:
contents: read
actions: read
security-events: write
packages: read
concurrency:
group: codeql-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
uses: QRun-IO/qqq-orb/.github/workflows/qbit-codeql.yml@c288a8864fe9054f68410e1d78f5863aea4c4d22
+16
View File
@@ -0,0 +1,16 @@
profile: qbit
orb_version: '0.8'
default_branch: develop
java_version: '21'
browsers: false
api_checks: false
docs_only: false
release_on_main: true
release_tag_policy: v-prefix
test_branch_policy: feature-no-hotfix
publish:
snapshot: true
release_candidate: true
release: true
hotfix: true
asciidoc: false
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to the Licensor for inclusion in the Work by the copyright
owner or by an individual or Legal Entity authorized to submit on
behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written
communication sent to the Licensor or its representatives, including
but not limited to communication on electronic mailing lists, source
code control systems, and issue tracking systems that are managed by,
or on behalf of, the Licensor for the purpose of discussing and
improving the Work, but excluding communication that is conspicuously
marked or otherwise designated in writing by the copyright owner as
"Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2022-2025 QRunIO, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+15
View File
@@ -0,0 +1,15 @@
qBit: SFTP Data Integration
Copyright 2022-2025 QRunIO, LLC
This product includes software developed at QRunIO, LLC (https://qrun.io/).
Licensed under the Apache License, Version 2.0.
================================================================================
Trademarks:
QQQ, qBits, qRun, qStudio, and the QRunIO logo are trademarks of QRunIO, LLC.
Use of these trademarks must comply with QRunIO's Trademark Guidelines.
================================================================================
+113 -192
View File
@@ -1,234 +1,155 @@
# QBit: SFTP Data Integration
# qbit-sftp-data-integration
[![Version](https://img.shields.io/badge/version-0.1.0-blue.svg)](https://github.com/Kingsrook/qbit-sftp-data-integration)
[![License](https://img.shields.io/badge/license-GNU%20Affero%20GPL%20v3-green.svg)](https://www.gnu.org/licenses/agpl-3.0.en.html)
[![Java](https://img.shields.io/badge/java-17+-blue.svg)](https://adoptium.net/)
SFTP file transfer and processing for QQQ applications.
## Overview
*Note: This is one of the original QBit implementations - so, some of the mechanics of how
it is loaded and used by an application are not exactly fully defined at the time of its
creation... Please excuse any dust or not-quite-round wheels you find here!*
**For:** QQQ developers who need to import data from or export data to SFTP servers
**Status:** Stable
This QBit provides tables and processes to implement an SFTP-based data integration, using
QQQ's Bulk Load mechanism to allow users to define file import mappings, and user-defined
Reports to define file exports.
## Why This Exists
The architecture of such an integration looks like:
* Shared by both imports and exports:
* User-defined records in an `SFTPConnection` table which define connection credentials
* For imports:
* User-defined records in an `SFTPImportConfig` table, which reference an `SFTPConnection` as the source of files to import
and a `BulkLoadProfile` as the instructions on how and where to load file contents.
* A table built on the QQQ SFTP-backend module, using the `SFTPImportConfig` table as its variant-options table, to serve
as the source for files to be imported.
* A process that syncs files from the file-source table to a file staging table, along with rows in the `ImportFile` table
to track their status.
* A process that executes the bulk load process, using the selected bulk load profile, against records in the `ImportFile`
table, accessing file contents from the staging file-table.
* For exports:
* User-defined records in an `SFTPExportConfig` table, which reference an `SFTPConnection` as the destination to write files
to, whose contents are generated by rendering a `SavedReport` (referencing data from any table in the application)
* A table built on the QQQ SFTP-backend module, using the `SFTPExportConfig` table as its variant-options table, to serve
as the destination for files to be imported.
* A process that renders saved reports, writing their contents to the destination SFTP backend.
Enterprise integrations often rely on file drops. Partners send CSV files to an SFTP server. Nightly jobs export reports to remote locations. Building this means handling connections, parsing files, tracking what's been processed, and managing errors.
## Prerequisites
This QBit provides SFTP connectivity with file polling, parsing, and processing built in. Configure a connection, define file formats, and let QQQ handle the rest.
- **Java 17+** (required for QQQ features)
- **Maven 3.8+** (for build system)
- **QQQ Framework** (qqq-backend-module-filesystem >= 0.24.0 for SFTP support)
- **Active Quartz Scheduler** in your QQQ instance for running scheduled cron jobs
- **Scheduled Jobs table** in your QQQ instance
## Features
## Usage
- **SFTP Connectivity** - Connect with password or key-based authentication
- **File Polling** - Scheduled checks for new files
- **Format Parsing** - CSV, fixed-width, and delimited file support
- **Record Mapping** - Map file columns to entity fields
- **Processing Tracking** - Track which files have been processed
- **Error Handling** - Move failed files to error directories
## Quick Start
### Prerequisites
- QQQ application (v0.35.0+)
- Database backend configured
- SFTP server credentials
### Installation
Add to your `pom.xml`:
### Pom dependency
```xml
<dependency>
<groupId>com.kingsrook.qbits</groupId>
<artifactId>qbit-sftp-data-integration</artifactId>
<version>${TODO}</version>
<version>0.3.0</version>
</dependency>
```
### Setup
Using this QBit follows the (evolving, but as of this time, standard) QBit Config + Produce pattern.
Required configs here are:
* For your SFTP source file table:
* Whether you want this QBit to define this table and its SFTP Backend, in which case, you would call this method on the Config object:
* `.withSourceFileTableConfig(ProvidedOrSuppliedTableConfig.provideTableUsingBackendNamed(SFTPImportSourceFileBackendMetaDataProducer.NAME))`
* Or if you want to define that table yourself and supply it to this QBit:
* `.withSourceFileTableConfig(ProvidedOrSuppliedTableConfig.useSuppliedTaleNamed("mySftpSourceFileTableName"))`
* Similarly, for Staging file table:
* If you want this QBit to define this table - note that you will need to always supply your own backend name:
* `.withStagingFileTableConfig(ProvidedOrSuppliedTableConfig.provideTableUsingBackendNamed("myStagingFileBackendName"))`
* Or if you want to define that table yourself and supply it to this QBit:
* `.withStagingFileTableConfig(ProvidedOrSuppliedTableConfig.useSuppliedTaleNamed("myStagingFileTableName"))`
* For your SFTP destination file table:
* Whether you want this QBit to define this table and its SFTP Backend, in which case, you would call this method on the Config object:
* `.withDestinationFileTableConfig(ProvidedOrSuppliedTableConfig.provideTableUsingBackendNamed(SFTPExportDestinationFileBackendMetaDataProducer.NAME))`
* Or if you want to define that table yourself and supply it to this QBit:
* `.withDestinationFileTableConfig(ProvidedOrSuppliedTableConfig.useSuppliedTaleNamed("mySftpDestinationFileTableName"))`
* The name of your instance's scheduler:
* `.withSchedulerName("myScheduler")`
Optional configs include:
* To enable public-key authentication to SFTP servers, you can load a private key into your application
server's sftp-backend, loading it through an environment variable, whose name you can set in the config
field: `sftpPrivateKeyEnvVarName`.
* By convention, you may wish to set this config value to: `SFTP_PRIVATE_KEY_PEM`.
* If this field is not set, then all SFTP connections will require password authentication.
* A `MetaDataCustomizerInterface<QTableMetaData>` can be run against all tables produced by this QBit:
`.withTableMetaDataCustomizer(tableMetaDataCustomizer)`
* A ProcessTracerCodeReference, which will be used on scheduled jobs ran by this QBit, as in:
* `.withProcessTracerCodeReference(new QCodeReference(StandardProcessTracer.class))`
* If you add additional fields to the `SFTPImportConfig` and `ImportFile` tables (e.g., for record security locks), you need to
tell the QBit to copy values from `SFTPImportConfig` records `ImportFile` records as they are built:
* `.withAdditionalFieldsToCopyFromSftpImportConfigToImportFile(Map.of("clientId", "clientId"))`
A full Config & Produce flow then, in a `MetaDataProducer<MetaDataProducerMultiOutput>`, may look like:
### Register the QBit
```java
public class ImportFileBulkLoadQBitMetaDataLoader extends MetaDataProducer<MetaDataProducerMultiOutput>
{
@Override
public MetaDataProducerMultiOutput produce(QInstance qInstance) throws QException
{
MetaDataProducerMultiOutput rs = new MetaDataProducerMultiOutput();
MetaDataCustomizerInterface<QTableMetaData> tableMetaDataCustomizer = (instance, table) ->
{
// any customizations you may want on all tables
return (table);
};
ImportFileBulkLoadQBitConfig SFTPDataIntegrationQBitConfig = new ImportFileBulkLoadQBitConfig()
.withSourceFileTableConfig(ProvidedOrSuppliedTableConfig.provideTableUsingBackendNamed(SFTPImportSourceFileBackendMetaDataProducer.NAME))
.withDestinationFileTableConfig(ProvidedOrSuppliedTableConfig.provideTableUsingBackendNamed(SFTPExportDestinationFileBackendMetaDataProducer.NAME))
.withStagingFileTableConfig(ProvidedOrSuppliedTableConfig.provideTableUsingBackendNamed(SFTPImportStagingFileBackendMetaDataProducer.NAME))
.withSchedulerName(QuartzSchedulerMetaDataProducer.NAME)
.withTableMetaDataCustomizer(tableMetaDataCustomizer)
.withProcessTracerCodeReference(new QCodeReference(StandardProcessTracer.class))
.withAdditionalFieldsToCopyFromSftpImportConfigToImportFile(Map.of("clientId", "clientId"));
new ImportFileBulkLoadQBitProducer()
.withImportFileBulkLoadQBitConfig(SFTPDataIntegrationQBitConfig)
.produce(qInstance);
// any additional customizations you may want
return (rs);
}
public class AppMetaProvider extends QMetaProvider {
@Override
public void configure(QInstance qInstance) {
new SftpDataIntegrationQBit().configure(qInstance);
}
}
```
## Provides
### Tables
* `sftpConnection` - Defines a connection to an SFTP server.
* `sftpImportConfig` - Defines the usage of an SFTP Server and a Bulk Load Config for loading files into records.
* `sftpExportConfig` - Defines the usage of an SFTP Server and a saved Report for exporting data.
* `importFile` - Records which track files imported from an SFTP server, as they are bulk loaded.
* `SFTPImportSourceFileTable` - _If so configured_ - SFTP-backed file-table, where files to be sync'ed and bulk-loaded come from.
* `SFTPExportDestinationFileTable` - _If so configured_ - SFTP-backed file-table, where exported reports are written to.
* `SFTPImportStagingFileTable` - _If so configured_ - Filesystem table, where files imported from an SFTP Import source are stored.
### Configure an SFTP Connection
### Processes
* `SFTPConnectionTester` - Used to validate the setup of SFTP Connection records.
* `syncSFTPImportConfigScheduledJob` - Table Sync process that manages Scheduled Job records for SFTPImportConfig records with a cron schedule.
* `SFTPImportFileSyncProcess` - Sync files from an SFTP server source file table (as defined in an SFTP Import Config) to the staging table.
* `ImportFileBulkLoadProcess` - Run the Bulk Load Process against ImportFile records and their corresponding file data.
* `RenderReportForSFTPExportProcess` - Render a report, writing it to an SFTP server as specified in an SFTPExportConfig, on a cron schedule.
## Dependencies
* `qqq-backend-module-filesystem` >= 0.24.0 (for SFTP support)
* An active Quartz scheduler in your QQQ instance, for running scheduled cron jobs, along with Scheduled Jobs table.
* Meta-data objects produced by `SavedBulkLoadProfileMetaDataProvider` from qqq-backend-core.
* Meta-data objects produced by `SavedReportsMetaDataProvider` from qqq-backend-core.
## 🤝 Contributing
**Important**: This repository is a component of the QQQ framework. All contributions, issues, and discussions should go through the main QQQ repository.
### Development Workflow
1. **Fork the main QQQ repository**: https://github.com/Kingsrook/qqq
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **Make your changes** (including QBit changes if applicable)
4. **Run tests**: `mvn test`
5. **Commit your changes**: `git commit -m 'Add amazing feature'`
6. **Push to the branch**: `git push origin feature/amazing-feature`
7. **Open a Pull Request** to the main QQQ repository
### Code Standards
- **Maven**: Follow Maven best practices
- **Documentation**: Update relevant documentation
- **Versioning**: Follow semantic versioning
## 📄 License
This project is licensed under the GNU Affero General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
```
QBit: SFTP Data Integration
Copyright (C) 2021-2024 Kingsrook, LLC
651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
contact@kingsrook.com | https://github.com/Kingsrook/
```java
new QSftpConnectionMetaData()
.withName("partnerSftp")
.withHost("sftp.partner.com")
.withPort(22)
.withUsername("integration")
.withPassword("${SFTP_PASSWORD}"); // From environment
```
**Note**: This is a component of the QQQ framework. For the complete license and more information, see the main QQQ repository: https://github.com/Kingsrook/qqq
## Usage
## 🏢 About Kingsrook
### Import Files
QBit: SFTP Data Integration is built by **[Kingsrook](https://qrun.io)** - making engineers more productive through intelligent automation and developer tools.
```java
new QSftpImportMetaData()
.withName("dailyOrderImport")
.withConnection("partnerSftp")
.withRemotePath("/outbound/orders/")
.withFilePattern("orders_*.csv")
.withTargetTable("order")
.withMapping(new QFieldMapping()
.withColumn("order_id", "orderNumber")
.withColumn("customer_email", "customerEmail")
.withColumn("total", "orderTotal"));
```
- **Website**: [https://qrun.io](https://qrun.io)
- **Contact**: [contact@kingsrook.com](mailto:contact@kingsrook.com)
- **GitHub**: [https://github.com/Kingsrook](https://github.com/Kingsrook)
### Export Files
## 🆘 Support & Community
```java
new QSftpExportMetaData()
.withName("nightlyInventoryExport")
.withConnection("partnerSftp")
.withRemotePath("/inbound/inventory/")
.withFileNamePattern("inventory_{date}.csv")
.withSourceTable("product")
.withFilter(new QQueryFilter()
.withCriteria("stockLevel", Operator.LESS_THAN, 10));
```
### ⚠️ Important: Use Main QQQ Repository
### Scheduled Polling
**All support, issues, discussions, and community interactions should go through the main QQQ repository:**
```java
new QSftpImportMetaData()
.withName("hourlyUpdates")
.withSchedule("0 0 * * * *") // Every hour
.withConnection("partnerSftp")
.withRemotePath("/updates/");
```
- **Main Repository**: https://github.com/Kingsrook/qqq
- **Issues**: https://github.com/Kingsrook/qqq/issues
- **Discussions**: https://github.com/Kingsrook/qqq/discussions
- **Wiki**: https://github.com/Kingsrook/qqq.wiki
### Key-Based Authentication
### Why This Repository Exists
```java
new QSftpConnectionMetaData()
.withName("secureSftp")
.withHost("secure.example.com")
.withUsername("service")
.withPrivateKeyPath("/path/to/id_rsa")
.withPrivateKeyPassphrase("${KEY_PASSPHRASE}");
```
This repository is maintained separately from the main QQQ repository to:
- **Enable independent QBit development** and versioning
- **Allow QBit-specific CI/CD** and deployment pipelines
- **Provide clear separation** between QBit components and core framework concerns
- **Support different release cycles** for QBits vs. core framework
## Configuration
### Getting Help
The QBit creates these tables:
- **Documentation**: Check the [QQQ Wiki](https://github.com/Kingsrook/qqq.wiki)
- **Issues**: Report bugs and feature requests on [Main QQQ Issues](https://github.com/Kingsrook/qqq/issues)
- **Discussions**: Join community discussions on [Main QQQ Discussions](https://github.com/Kingsrook/qqq/discussions)
- **Questions**: Ask questions in the main QQQ repository
| Table | Purpose |
|-------|---------|
| `sftp_connection` | Connection configurations |
| `sftp_file_log` | Processed file history |
| `sftp_error_log` | Failed file details |
### Contact Information
### Post-Processing
- **Company**: Kingsrook, LLC
- **Email**: contact@kingsrook.com
- **Website**: https://kingsrook.com
- **Main GitHub**: https://github.com/Kingsrook/qqq
```java
new QSftpImportMetaData()
.withName("orderImport")
.withPostProcessAction(PostProcessAction.MOVE)
.withProcessedPath("/archive/")
.withErrorPath("/errors/");
```
## 🙏 Acknowledgments
## Project Status
- **QQQ Framework Team**: For the underlying low-code platform
- **Maven Community**: For the robust build system
- **Open Source Community**: For the tools and libraries that make this possible
Stable and production-ready.
---
### Roadmap
**Built with ❤️ by the Kingsrook Team**
- S3 and Azure Blob support
- PGP encryption/decryption
- File validation rules
**This is a QBit component of the QQQ framework. For complete information, support, and community, visit: https://github.com/Kingsrook/qqq**
## Contributing
1. Fork the repository
2. Create a feature branch
3. Run tests: `mvn clean verify`
4. Submit a pull request
## License
Proprietary - QRun.IO
+2 -2
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>com.kingsrook</groupId>
<artifactId>qbit-build-parent</artifactId>
<version>1.1.0</version>
<version>1.5.1</version>
</parent>
<groupId>com.kingsrook.qbits</groupId>
@@ -64,7 +64,7 @@
</scm>
<properties>
<revision>0.2.0-SNAPSHOT</revision>
<revision>0.3.0</revision>
</properties>
<dependencyManagement>