|
3 | 3 | Book is a class for interacting with datamule's S3 Layer. |
4 | 4 |
|
5 | 5 |
|
| 6 | +## `download_dataset` |
| 7 | + |
| 8 | +Download pre-built datasets directly from Datamule. |
| 9 | + |
| 10 | +Available datasets: |
| 11 | + |
| 12 | +- **sec_accessions**: SEC Accessions Master Index - newline-delimited text file of all accession numbers |
| 13 | + |
| 14 | +- **sec_master_submissions**: SEC Master Submissions Table - comprehensive master index with filing metadata |
| 15 | + - Columns: cik (Int64), accessionNumber (String), filingDate (Date), submissionType (String), reportDate (Date), acceptanceDateTime (Datetime), act (String), fileNumber (String), filmNumber (String), items (String), size (Int64), isXBRL (Boolean), isInlineXBRL (Boolean) |
| 16 | + |
| 17 | +- **sec_accession_cik_table**: SEC Accession CIK Table - links accession numbers to company CIKs |
| 18 | + - Columns: accessionNumber (BIGINT UNSIGNED), cik (BIGINT UNSIGNED) |
| 19 | + |
| 20 | +- **sec_documents_table**: SEC Documents Table - document-level details for all files within filings |
| 21 | + - Columns: accessionNumber (BIGINT UNSIGNED), documentType (VARCHAR(128)), sequence (SMALLINT), filename (VARCHAR(500)), description (VARCHAR(1000)), secsgmlSizeBytes (INT) |
| 22 | + |
| 23 | +- **sec_submission_details_table**: SEC Submissions Details Table - filing metadata with submission types and dates |
| 24 | + - Columns: accessionNumber (BIGINT UNSIGNED), submissionType (VARCHAR(16)), filingDate (DATE), reportDate (DATE), detectedTime (DATETIME), containsXBRL (BOOLEAN) |
| 25 | + |
| 26 | +- **simple_xbrl_table**: Simple XBRL Table - parsed XBRL facts from SEC filings |
| 27 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), context_id (BIGINT UNSIGNED), taxonomy (VARCHAR(16)), name (VARCHAR(256)), value (TEXT), period_start_date (DATE), period_end_date (DATE), members (TEXT) |
| 28 | + |
| 29 | +- **proxy_voting_records_table**: Proxy Voting Records Table - institutional investor voting records |
| 30 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), cusip (CHAR(9)), issuerName (VARCHAR(256)), meetingDate (DATE), categoryType (VARCHAR(256)), voteDescription (VARCHAR(8192)), managementRecommendation (VARCHAR(16)), howVoted (VARCHAR(16)), sharesVoted (BIGINT UNSIGNED), sharesOnLoan (BIGINT UNSIGNED) |
| 31 | + |
| 32 | +- **institutional_holdings_table**: Institutional Holdings Table - 13F institutional holdings |
| 33 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), cusip (CHAR(9)), nameOfIssuer (VARCHAR(256)), titleOfClass (VARCHAR(256)), value (BIGINT UNSIGNED), sharesOrPrincipalAmount (BIGINT UNSIGNED), sharesOrPrincipalAmountType (VARCHAR(16)), investmentDiscretion (VARCHAR(16)), putCall (VARCHAR(16)), otherManager (VARCHAR(256)), votingAuthoritySole (BIGINT UNSIGNED), votingAuthorityShared (BIGINT UNSIGNED), votingAuthorityNone (BIGINT UNSIGNED) |
| 34 | + |
| 35 | +- **metadata_ownership_table**: Insider Ownership Metadata Table - filing-level metadata for insider reports |
| 36 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), issuerCik (BIGINT UNSIGNED), issuerName (VARCHAR(128)), issuerTradingSymbol (VARCHAR(16)), documentType (VARCHAR(8)), periodOfReport (DATE), notSubjectToSection16 (VARCHAR(8)), form3HoldingsReported (BIGINT UNSIGNED), form4TransactionsReported (BIGINT UNSIGNED), dateOfOriginalSubmission (DATE), noSecuritiesOwned (BIGINT UNSIGNED), aff10b5One (VARCHAR(8)), schemaVersion (VARCHAR(8)) |
| 37 | + |
| 38 | +- **reporting_owner_ownership_table**: Insider Reporting Owner Table - insider details and relationships |
| 39 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), rptOwnerCik (BIGINT UNSIGNED), rptOwnerName (VARCHAR(256)), rptOwnerStreet1 (VARCHAR(64)), rptOwnerStreet2 (VARCHAR(64)), rptOwnerCity (VARCHAR(64)), rptOwnerState (CHAR(4)), rptOwnerStateDescription (VARCHAR(64)), rptOwnerZipCode (VARCHAR(16)), rptOwnerIsDirector (VARCHAR(8)), rptOwnerIsOfficer (VARCHAR(8)), rptOwnerIsTenPercentOwner (VARCHAR(8)), rptOwnerIsOther (VARCHAR(8)), rptOwnerOfficerTitle (VARCHAR(64)), rptOwnerOtherText (VARCHAR(64)) |
| 40 | + |
| 41 | +- **non_derivative_transaction_ownership_table**: Insider Non-Derivative Transactions Table - common stock transactions |
| 42 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), securityTitle (VARCHAR(128)), transactionDate (DATE), deemedExecutionDate (DATE), transactionFormType (BIGINT UNSIGNED), transactionCode (CHAR(1)), equitySwapInvolved (VARCHAR(8)), transactionShares (BIGINT UNSIGNED), transactionPricePerShare (BIGINT UNSIGNED), transactionAcquiredDisposedCode (CHAR(1)), sharesOwnedFollowingTransaction (BIGINT UNSIGNED), valueOwnedFollowingTransaction (BIGINT UNSIGNED), directOrIndirectOwnership (CHAR(1)), natureOfOwnership (VARCHAR(256)), transactionTimeliness (CHAR(1)) |
| 43 | + |
| 44 | +- **non_derivative_holding_ownership_table**: Insider Non-Derivative Holdings Table - current ownership positions |
| 45 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), securityTitle (VARCHAR(128)), sharesOwnedFollowingTransaction (BIGINT UNSIGNED), valueOwnedFollowingTransaction (BIGINT UNSIGNED), directOrIndirectOwnership (CHAR(1)), natureOfOwnership (VARCHAR(256)), transactionFormType (BIGINT UNSIGNED) |
| 46 | + |
| 47 | +- **derivative_transaction_ownership_table**: Insider Derivative Transactions Table - options, warrants transactions |
| 48 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), securityTitle (VARCHAR(128)), conversionOrExercisePrice (BIGINT UNSIGNED), transactionDate (DATE), deemedExecutionDate (DATE), transactionFormType (BIGINT UNSIGNED), transactionCode (CHAR(1)), equitySwapInvolved (VARCHAR(8)), transactionShares (BIGINT UNSIGNED), transactionPricePerShare (BIGINT UNSIGNED), transactionAcquiredDisposedCode (CHAR(1)), transactionTotalValue (BIGINT UNSIGNED), exerciseDate (DATE), expirationDate (DATE), underlyingSecurityTitle (VARCHAR(128)), underlyingSecurityShares (BIGINT UNSIGNED), underlyingSecurityValue (BIGINT UNSIGNED), sharesOwnedFollowingTransaction (BIGINT UNSIGNED), valueOwnedFollowingTransaction (BIGINT UNSIGNED), directOrIndirectOwnership (CHAR(1)), natureOfOwnership (VARCHAR(256)), transactionTimeliness (CHAR(1)) |
| 49 | + |
| 50 | +- **derivative_holding_ownership_table**: Insider Derivative Holdings Table - derivative security positions |
| 51 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), securityTitle (VARCHAR(128)), conversionOrExercisePrice (BIGINT UNSIGNED), exerciseDate (DATE), expirationDate (DATE), underlyingSecurityTitle (VARCHAR(128)), underlyingSecurityShares (BIGINT UNSIGNED), underlyingSecurityValue (BIGINT UNSIGNED), sharesOwnedFollowingTransaction (BIGINT UNSIGNED), valueOwnedFollowingTransaction (BIGINT UNSIGNED), directOrIndirectOwnership (CHAR(1)), natureOfOwnership (VARCHAR(256)), transactionFormType (BIGINT UNSIGNED) |
| 52 | + |
| 53 | +- **owner_signature_ownership_table**: Insider Owner Signatures Table - signature information for filings |
| 54 | + - Columns: id (BIGINT UNSIGNED), accessionNumber (BIGINT UNSIGNED), signatureName (VARCHAR(256)), signatureDate (DATE) |
| 55 | + |
| 56 | +### Example |
| 57 | + |
| 58 | +Download a dataset with auto-detected filename: |
| 59 | +```python |
| 60 | +from datamule import Book |
| 61 | +book = Book() |
| 62 | + |
| 63 | +book.download_dataset( |
| 64 | + dataset='sec_accessions', |
| 65 | + api_key = None # Uses environmental variable if set |
| 66 | +) |
| 67 | +``` |
| 68 | + |
| 69 | +Download with custom filename: |
| 70 | +```python |
| 71 | +book.download_dataset( |
| 72 | + dataset='institutional_holdings_table', |
| 73 | + filename='my_holdings_data.parquet' |
| 74 | +) |
| 75 | +``` |
| 76 | + |
| 77 | +### Parameters |
| 78 | + |
| 79 | +- **dataset**: Dataset identifier (lowercase underscore format, e.g. 'sec_accessions') |
| 80 | +- **api_key**: Your Datamule API key |
| 81 | +- **filename**: Optional output filename. If not provided, extracts filename from download URL with correct extension |
| 82 | + |
| 83 | + |
6 | 84 | ## `s3_transfer` |
7 | 85 |
|
8 | 86 | Transfer from datamule S3 to your S3 bucket. |
|
0 commit comments