Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
be236e7
fix: enhance TLS configuration to support 'skip-verify' option
flarco Aug 20, 2025
13e5d2a
fix: enhance ClickHouse connection handling with TLS and SSH tunnel s…
flarco Aug 20, 2025
fad8bfa
fix: improve SSH tunnel handling by extracting host and port from con…
flarco Aug 20, 2025
6189d7b
fix: improve ClickHouse connection handling for HTTP and SSH tunnel s…
flarco Aug 20, 2025
10b6bf0
fix: remove redundant TLS config initialization in ClickHouse connection
flarco Aug 20, 2025
5010f43
fix: extend TLS configuration to support 'custom' option in ClickHous…
flarco Aug 20, 2025
100dd4d
fix: add 'secure=true' query parameter for HTTPS URLs in Clickhouse c…
flarco Aug 20, 2025
4612052
fix: enhance EnsureBinDuckDB to validate DUCKDB_PATH as a file and su…
flarco Aug 21, 2025
69a94f4
fix: update mcp.yaml to enhance documentation and clarify connection …
flarco Aug 21, 2025
7fdba6f
fix: update GetNativeType to use BIGNUMERIC for BigQuery when scale >…
flarco Aug 22, 2025
34fab37
fix: add InliningLimit to DuckLakeConn and initialize from properties
flarco Aug 22, 2025
5a9c297
fix: clean up Clickhouse subquery by removing FORMAT CSVWithNames
flarco Aug 22, 2025
ae2ff19
fix: remove FORMAT CSVWithNames from Clickhouse subquery and add expo…
flarco Aug 22, 2025
d4bf060
fix: allow custom delimiter for CSV output in WriteCsv method
flarco Aug 22, 2025
ba38951
fix: update defaultCsvConfig to set FileMaxRows from properties if sp…
flarco Aug 23, 2025
bb8a290
fix: update TimeType mapping to use TimeFieldType in BigQuery schema
flarco Aug 23, 2025
5d49097
fix: enhance debug logging for DuckDb direct stream to include stream…
flarco Aug 23, 2025
912e97b
fix: update BulkImportFlow to use FileTypeArrow for default and arrow…
flarco Aug 23, 2025
2f03344
fix: update flarco/g dependency to v0.1.156
flarco Aug 23, 2025
6b153e9
fix: update DuckDB extension handling for Arrow support
flarco Aug 23, 2025
191f8b5
fix: simplify DuckDB extension name for clarity
flarco Aug 23, 2025
69fb2b9
fix: add retry logic for EnsureBinDuckDB version check on "text file …
flarco Aug 24, 2025
07f14c9
fix: add retry logic for handling "text file busy" errors in Oracle, …
flarco Aug 24, 2025
2cb5155
fix: update type mappings
flarco Aug 24, 2025
b151908
fix: add time package import for improved time handling
flarco Aug 24, 2025
a5dad0e
feat: add TODO for Arrows output in StreamContext function
flarco Aug 24, 2025
c7dd450
fix: update connection tool documentation and examples for clarity an…
flarco Aug 24, 2025
5b82ac1
Add comprehensive Sling Replication Guide for LLMs
flarco Aug 24, 2025
60ea9bc
fix: update flarco/g dependency version to v0.1.157
flarco Aug 24, 2025
69adfe4
fix: enhance GetLocalConns to handle URL parsing from payload
flarco Aug 24, 2025
cf879cf
refactor: replace interface{} with any
flarco Aug 24, 2025
3a59b9f
feat: add CheckType method to determine data types and enhance row pr…
flarco Aug 24, 2025
3a84134
fix: add mutex for thread-safe access to typeTemplate cache
flarco Aug 24, 2025
6068fd3
fix: create a copy of the row for safe evaluation of transforms
flarco Aug 24, 2025
0f4719f
feat: add support for Arrow format and define column types in Dataflo…
flarco Aug 24, 2025
9f63326
fix: change default import method to CSV for DuckDB connections
flarco Aug 25, 2025
42a67b4
feat: enable Arrow extension and set column types in Dataflow tests
flarco Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
765 changes: 765 additions & 0 deletions cmd/sling/resource/llm_CONNECTION.md

Large diffs are not rendered by default.

693 changes: 693 additions & 0 deletions cmd/sling/resource/llm_CONNECTION_DATABASE.md

Large diffs are not rendered by default.

848 changes: 848 additions & 0 deletions cmd/sling/resource/llm_CONNECTION_FILE.md

Large diffs are not rendered by default.

1,909 changes: 1,909 additions & 0 deletions cmd/sling/resource/llm_REPLICATION.md

Large diffs are not rendered by default.

706 changes: 342 additions & 364 deletions cmd/sling/resource/mcp.yaml

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions cmd/sling/tests/replications/r.48.bigquery_time_datatype.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
source: POSTGRES
target: BIGQUERY

defaults:
mode: truncate

hooks:
start:
- type: query
connection: '{source.name}'
query: |
DROP TABLE IF EXISTS public.test_time_datatype;
CREATE TABLE public.test_time_datatype (
id INTEGER,
time_col TIME,
time_tz_col TIME WITH TIME ZONE,
time_precision_col TIME(3)
);
INSERT INTO public.test_time_datatype VALUES
(1, '08:30:45', '08:31:45+02:00', '08:30:45.123'),
(2, '12:15:30', '12:11:30-05:00', '12:15:30.456'),
(3, '23:59:59', '23:51:59+00:00', '23:59:59.789');

end:
- type: query
connection: '{target.name}'
query: |
SELECT
column_name,
data_type
FROM `public`.INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'test_time_datatype2'
ORDER BY ordinal_position
into: column_info

- type: log
message: |
Target table column info:
{ pretty_table(store.column_info) }

- type: query
connection: '{target.name}'
query: SELECT * FROM public.test_time_datatype2 ORDER BY id
into: result_data

- type: log
message: |
Target table data:
{ pretty_table(store.result_data) }

# Clean up
- type: query
connection: '{source.name}'
query: DROP TABLE IF EXISTS public.test_time_datatype

- type: query
connection: '{target.name}'
query: DROP TABLE IF EXISTS public.test_time_datatype2

streams:
public.test_time_datatype:
object: public.test_time_datatype2
mode: full-refresh
24 changes: 20 additions & 4 deletions cmd/sling/tests/suite.cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -788,13 +788,29 @@
- 'execution succeeded'

- id: 104
name: Test PostgreSQL TIME datatype preservation
run: sling run -d -r cmd/sling/tests/replications/r.46.postgres_time_datatype.yaml
streams: 1
rows: 3
name: Test PostgreSQL & BigQury TIME datatype preservation
run: |
sling run -d -r cmd/sling/tests/replications/r.46.postgres_time_datatype.yaml
sling run -d -r cmd/sling/tests/replications/r.48.bigquery_time_datatype.yaml
output_contains:
- '| time without time zone |'
- '| time with time zone |'
- | # pg output
+----+----------+--------------------+----------------+
| ID | TIME_COL | TIME_PRECISION_COL | TIME_TZ_COL |
+----+----------+--------------------+----------------+
| 1 | 08:30:45 | 08:30:45.123 | 08:30:45+02:00 |
| 2 | 12:15:30 | 12:15:30.456 | 12:15:30-05:00 |
| 3 | 23:59:59 | 23:59:59.789 | 23:59:59+00:00 |
+----+----------+--------------------+----------------+
- | # bq output
+----+----------+--------------------+----------------+
| ID | TIME_COL | TIME_PRECISION_COL | TIME_TZ_COL |
+----+----------+--------------------+----------------+
| 1 | 08:30:45 | 08:30:45.123 | 08:31:45+02:00 |
| 2 | 12:15:30 | 12:15:30.456 | 12:11:30-05:00 |
| 3 | 23:59:59 | 23:59:59.789 | 23:51:59+00:00 |
+----+----------+--------------------+----------------+

- id: 105
name: Test MSSQL uniqueidentifier datatype preservation
Expand Down
8 changes: 8 additions & 0 deletions core/dbio/connection/connection_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ func GetLocalConns(options ...any) ConnEntries {
g.Warn(e)
continue
}
} else if url, ok := payload["url"]; ok && err == nil {
cType := SchemeType(cast.ToString(url))
conn, err = NewConnectionFromMap(g.M("name", key, "type", cType, "data", payload))
if err != nil {
e := g.F("could not parse env payload %s: %s", key, g.ErrMsgSimple(err))
g.Warn(e)
continue
}
} else {
// Parse URL
if !strings.Contains(val, "://") || strings.Contains(val, "{") || strings.Contains(val, "[") {
Expand Down
5 changes: 4 additions & 1 deletion core/dbio/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -3151,8 +3151,11 @@ func (conn *BaseConn) credsProvided(provider string) bool {
}

func (conn *BaseConn) makeTlsConfig() (tlsConfig *tls.Config, err error) {
if cast.ToBool(conn.GetProp("tls")) {
if val := strings.ToLower(conn.GetProp("tls")); g.In(val, "true", "skip-verify", "custom") {
tlsConfig = &tls.Config{}
if val == "skip-verify" {
tlsConfig.InsecureSkipVerify = true
}
}

// legacy only handles files
Expand Down
1 change: 1 addition & 0 deletions core/dbio/database/database_bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ func getBqSchema(columns iop.Columns) (schema bigquery.Schema) {
iop.DecimalType: bigquery.NumericFieldType,
// "decimal": bigquery.FloatFieldType,
iop.TimeType: bigquery.StringFieldType,
iop.TimezType: bigquery.StringFieldType,
iop.TimestampType: bigquery.TimestampFieldType,
iop.TimestampzType: bigquery.TimestampFieldType,
}
Expand Down
Loading