{"schemaVersion":1,"resourceType":"connector","slug":"fixedformat","name":"Fixed-width files","catalog":"fixed","description":"Read and write fixed-width and mainframe files, including COBOL copybooks and EBCDIC","language":"Rust","categories":["formats"],"repository":"https://github.com/Query-farm/vgi-fixedformat","license":"MIT","generatedAt":"2026-12-01T18:22:16+00:00","runtime":{"engineVersion":"2.0.1","protocolVersion":"3.4"},"release":{"tag":"v0.13.1","publishedAt":"2026-11-25T21:38:57Z","url":"https://github.com/Query-farm/vgi-fixedformat/releases/tag/v0.13.1"},"links":{"html":"https://query.farm/products/orchard/connectors/fixedformat/","llms":"https://query.farm/products/orchard/connectors/fixedformat/llms.txt","markdown":"https://query.farm/products/orchard/connectors/fixedformat/index.md","json":"https://query.farm/products/orchard/api/v1/connectors/fixedformat.json","objects":"https://query.farm/products/orchard/api/v1/connectors/fixedformat/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=fixedformat&q={query}"},"authentication":{"mode":"none_declared","guidance":"No service credentials are declared by this connector. Individual datasets, input files or deployments may have their own prerequisites.","interpretation":"Secret parameter required flags describe the upstream declaration; they do not override the service-level mode above. Keep secrets in environment variables or the deployment secret store. SQL values in angle brackets are placeholders, not automatic environment lookups. Native DuckDB and Haybarn 2.0.1 do not provide a SQL getenv() function, even when worker-supplied snippets mention it. Read environment variables in your application and pass credential values through client parameter bindings (for example, Python con.execute(\"CREATE SECRET stripe (TYPE stripe, api_key ?)\", [os.environ[\"STRIPE_API_KEY\"]]) after attaching the connector. Omit unused optional parameters and keep real values out of saved SQL and logs.","secrets":[]},"deployment":{"local":{"methods":[{"id":"github","label":"From GitHub","icon":"simple-icons:github","steps":[{"title":"Attach the release directly","description":"Downloads the latest release for your platform and caches it locally.","lang":"sql","code":"ATTACH 'fixed' AS fixed (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-fixedformat'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'fixed' AS fixed (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-fixedformat:0.13.1'\n);"}]}],"pinnedMethods":[{"id":"github","label":"From GitHub","icon":"simple-icons:github","steps":[{"title":"Attach the release directly","description":"Uses the verified release each time you attach the connector.","lang":"sql","code":"ATTACH 'fixed' AS fixed (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-fixedformat@v0.13.1'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'fixed' AS fixed (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-fixedformat:0.13.1'\n);"}]}]},"selfHost":{"instructions":"https://github.com/Query-farm/vgi-fixedformat","connectionGuide":"https://query.farm/vgi/connect-to-a-worker/","guidance":"Deploy using the connector repository instructions and use its supported HTTP or SSH transport. Replace example URLs with your actual deployment; configure its authentication."},"queryFarm":{"available":true,"console":"https://auth.queryfarm.cloud/console/new?worker=fixedformat","organizationMonthlyMinimumUsd":10,"pricing":"https://query.farm/products/orchard/hosted/"},"publicDemo":null},"setup":{"extensions":{"duckdb":"SET allow_extension_repositories = 'allowed';\n\nCREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm\n    WITH PREFIX 'https://duckdb-extensions.query.farm';\n\nINSTALL vgi FROM query_farm;\nLOAD vgi FROM query_farm;","haybarn":"INSTALL vgi FROM community;\nLOAD vgi;"},"attachSql":"ATTACH 'fixed' AS fixed (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-fixedformat'\n);","attachOptions":[],"note":"Install and load VGI, attach the connector using the catalog alias shown here, then create required secrets. Replace placeholders and omit unused optional secret parameters. Satisfy file, network and credential prerequisites before executing a query."},"example":{"title":"Read a fixed-width accounts file as typed rows","sql":"SELECT * FROM fixed.main.read_fixed('https://raw.githubusercontent.com/Query-farm/vgi-fixedformat/v0.12.0/data/accounts.dat', 'name:A10 qty:9(5)')","requiresCredentials":null,"note":null,"objects":[{"name":"fixed.main.read_fixed","kind":"table_function","links":{"html":"https://query.farm/products/orchard/connectors/fixedformat/#obj-main-read_fixed","markdown":"https://query.farm/products/orchard/connectors/fixedformat/objects/table_function.bWFpbg.cmVhZF9maXhlZA.md","json":"https://query.farm/products/orchard/api/v1/connectors/fixedformat/objects/table_function.bWFpbg.cmVhZF9maXhlZA.json"}}],"evidence":{"status":"captured_result","capturedAt":"2026-12-01T06:12:39+00:00","engineVersion":"2.0.1","protocolVersion":"3.4.0","releaseTag":"v0.13.1","sample":{"columns":["name","qty"],"types":["VARCHAR","BIGINT"],"rows":[["JOHN",42],["JANE",100],["BOB",7]],"more":false}},"artifact":null},"objects":{"total":14,"index":"https://query.farm/products/orchard/api/v1/connectors/fixedformat/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=fixedformat&q={query}"},"agentTasks":["I have one fixed-width record 'JOHN      00042' where the first 10 characters are an account name and the next 5 are a zero-padded quantity. Parse it and return the quantity as a single integer column named qty.","The file data/large.dat is a newline-delimited fixed-width feed where each record is a single 7-digit zero-padded id. Profile it: return one row with a column named records (the record count), a column named min_id, and a column named max_id.","A nightly job drops one or more fixed-width account files into data/, named acct1.dat, acct2.dat, and so on. Each record is a 10-character account name followed by a 5-digit zero-padded quantity. Read all of the acct*.dat files at once and return the total quantity across every record as a single column named total_qty.","We received a mainframe extract at data/ebcdic_comp3.dat. It is EBCDIC-encoded and fixed-length (no line delimiters between records). Each record is a 5-byte name (PIC X(5)) followed by a signed packed-decimal amount PIC S9(3)V99 COMP-3. Decode the file and return the largest amount as a single column named max_amount.","We need to emit a single fixed-width record for an export. The layout is a 10-character left-justified, space-padded account name followed by a 5-digit zero-padded quantity. Build the record for account name 'ALICE' with quantity 5 and return the resulting record text as a single column named record.","A mainframe ingest job needs an account record encoded the way the host expects it: the name as a 5-byte EBCDIC field (PIC X(5)) followed by a signed packed-decimal amount PIC S9(3)V99 COMP-3. Encode name 'ACME' with amount 123.45 and return the resulting record bytes as an uppercase hex string in a single column named record_hex.","Export two accounts to a newline-delimited fixed-width file at data/_agent_write.dat, where each record is a 10-character left-justified name followed by a 5-digit zero-padded quantity: ALICE with quantity 5 and BOB with quantity 999. Return the write summary with a column named rows_written and a column named bytes_written.","I have the fixed-width layout 'name:A10 qty:9(5)' — a 10-character name followed by a 5-digit zero-padded quantity. Without reading any data, work out the byte offset at which the qty field begins and return it as a single column named qty_offset."],"provenance":{"generatedAt":"2026-12-01T18:22:16+00:00","repository":"https://github.com/Query-farm/vgi-fixedformat","harvest":{"status":"ok","method":"github-auto","error":null,"vgi_version":"9773130dde"},"catalogVerification":{"verified":true,"status":"passed","total":3,"passed":3,"failed":0,"needs_credentials":0,"location":"github-auto://Query-farm/vgi-fixedformat@v0.13.1","transport":"github-auto","environment":{"vgi_extension_version":"9773130dde","haybarn_version":"2.0.1rc3","engine_version":"v2.0.1","python":"3.12.4","platform":"darwin_arm64","protocol_version":"3.4.0"},"checked_at":"2026-12-01T06:12:35+00:00"},"interpretation":"Catalog verification records the harvest environment. It is not proof that every query or current live API call succeeds. Only an example with captured_result has a saved result for that exact SQL."},"interpretation":["Missing, null, or undeclared metadata means unknown; do not invent defaults, credential scope, platform support or endpoint URLs.","Search is keyword retrieval, not proof of a capability. Read the exact object declaration before generating SQL.","A table and a table function can have the same name. Preserve parentheses and use the matching overload and schema.","Service credentials, external data availability and deployment authentication are separate requirements."]}