Skip to content
Learn › Get data in: open the docs menu

Import a file from a URL into Mammoth

From URL creates a dataset from a file at a web address, so you don't download and re-upload it. In the Data Library, click New dataset, choose From URL, paste the link into Enter file URL and click Read file. It works with direct file URLs and with cloud storage URLs such as S3, Google Cloud Storage, Azure Blob Storage and Dropbox, with no other set-up.

When to import from a URL

From URL suits files at a web address that you refresh on demand or on a schedule: vendor or partner files published to a stable URL (for example, transaction CSV files a team categorizes and checks in pipelines, with nobody downloading or re-uploading), cloud storage files shared by public or signed URLs (such as production metrics exported to S3, imported without S3 permissions or manual transfers), and report servers that generate downloadable data files.

MethodBest forProsCons
From URLFiles at a web addressNo manual download, works with signed URLs, refreshes from the linkNo separate authentication headers
File uploadLocal files, or files with no stable, reachable URLImmediate; 50 MB limit per fileManual
ConnectorsDatabase sources and application APIs, complex sign-ins, data that must flow both waysScheduled refresh, always currentNeeds a connector set up
REST API connectorCustom integrationsSupports authentication headers and custom requestsNeeds API set-up

Create a dataset from a URL

  1. Go to the Data Library and select the project you want to add data to.
  2. Click New Dataset in the top right corner, and select From URL in the left-hand menu.
  3. Paste your direct file URL into the Enter file URL field.
  4. Click Read file. Mammoth shows a preview: the file name, where it comes from (such as From example.com), the number of rows and columns, and the first rows. A workbook with several tabs shows, for example, 3 tabs, each becomes a dataset, followed by the tab names.
  5. For a single CSV, TSV or TXT file, answer Should this dataset follow the link? (see the table). For other files, the window shows "A JSON or Excel file can't be fetched again from its link, so it is added once."
  6. Click Create new dataset.
OptionWhat it does
Keep it linked (Recommended)A live source. You can get the latest file from the link whenever you like.
Copy it onceWorks like an uploaded file. The link is kept only as a note.

You can change this later from the dataset's ⋮ menu (see Get the latest file from a linked URL). The dialog closes right away, and a placeholder row appears in the Data Library while the file downloads; time depends on the file size.

You can also paste a link into the search box of the Connectors launcher and choose Fetch this file.

Supported URLs and file types

The URL must:

  • start with http:// or https://;
  • give a file name: Mammoth takes it from the Content-Disposition header or the last segment of the URL path. A URL such as https://example.com/download?id=7 with neither fails;
  • return the file itself, not an HTML page or a download landing page;
  • point to a supported file type and be reachable when you import.

File types are the same as for file upload: .txt, .csv, .tsv, .psv, .xls, .xlsx, .xlsm, .xml, .json, .jsonl, .ndjson, .zip, .bz2, .gz, .tar, .7z, .pdf, .tiff, .tif, .jpeg, .jpg, .png, .heic, .heif, .webp. Only a CSV, TSV or TXT file can keep following its link. Other files are added once.

SourceExample
Direct file URLhttps://example.com/data/sales_report.csv, https://reports.company.com/Q1_2024.xlsx
Google Cloud Storagehttps://storage.googleapis.com/bucket-name/monthly-data.csv
Azure Blob Storagehttps://storageaccount.blob.core.windows.net/container/file.csv
Dropbox shared linkhttps://www.dropbox.com/s/abc123/data-export.csv?dl=1. Mammoth sets dl=1 for you, so the file downloads instead of the preview page.

Import private files with a signed URL

Prefer HTTPS URLs (https://example.com/data.csv) over HTTP (http://example.com/data.csv). For private cloud storage, use signed URLs, which carry time-limited access in the URL itself. Mammoth fetches the file using the URL as given; From URL has no separate credential fields.

An AWS S3 signed URL looks like this (example format only, not a working URL):

https://bucket-name.s3.amazonaws.com/file.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=EXAMPLE&X-Amz-Date=20240315T120000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=EXAMPLE_SIGNATURE

A valid S3 signed URL must include all the X-Amz-* parameters; the base S3 URL without them returns an Access Denied error.

Limits

  • Mammoth waits up to 9 seconds to connect and 27 seconds for the server to respond. A slower or unavailable server makes the import fail.
  • Larger files take longer to download. If your source keeps producing very large files, ask the provider to compress them (gzip, zip) or split them into smaller parts.
  • A time-limited signed URL must not have expired when you submit.

Troubleshooting URL imports

SymptomCauseFix
A warning under the URL field after Read file: the URL can't be reachedThe URL changed or the file moved, a signed URL expired, or the file is temporarily unavailable. A wrong URL, expired link, timeout or refused connection all give the same error.Open the URL in a browser and check it returns the file. Generate a fresh signed URL. Ask the data provider whether the URL is stable.
A warning under the URL field after Read file: a file problemNo file name in the URL path and no Content-Disposition header; the server returns audio, video or an HTML page; the extension doesn't match the content; or the format isn't supportedMake sure the URL returns the file itself, not a download or preview page, and that the format is in the list above
The same error as an unreachable URL, with access denied (the source answers 401 Unauthorized or 403 Forbidden)The file isn't public, a signed URL expired, or the source needs authentication headersUse a public URL or a valid signed URL. For header-based sign-in (Bearer tokens, Basic Auth), use the REST API connector, because From URL can't send separate authentication headers.
A placeholder row stays in the Data Library for a long timeThe file is still downloading. This is expected.Wait for it to finish. If it fails after a long wait, use a compressed version or split the file.
Was this page helpful?

Something wrong? support@mammoth.io