Skip to content

Conversation

jcortes
Copy link
Collaborator

@jcortes jcortes commented Aug 22, 2025

WHY

Resolves #17846

Summary by CodeRabbit

  • New Features

    • Authenticate and connect to Nasdaq Data Link tables.
    • View table metadata (columns, types, keys).
    • Fetch table data with filters, column selection, and automatic pagination (up to ~30K rows).
    • Export full or filtered tables as a zipped CSV and receive a temporary download link (subject to subscription limits).
    • Dynamic column picker auto-populates based on selected publisher/table.
  • Chores

    • Bumped package version to 0.1.0 and added a new dependency.

@jcortes jcortes self-assigned this Aug 22, 2025
Copy link

vercel bot commented Aug 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Aug 22, 2025 10:04pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Aug 22, 2025 10:04pm

Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

Walkthrough

Adds Nasdaq Data Link app integration with axios-based requests, pagination, and prop definitions. Introduces three actions: get table metadata, get table data (with pagination and optional filters/columns), and export table (bulk download). Adds a JSON parsing utility and updates package metadata and dependency.

Changes

Cohort / File(s) Change Summary
Actions: Table operations
components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs, components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs, components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs
New actions to retrieve table metadata, fetch table data with pagination and optional filters/columns, and initiate/export bulk table download returning status/link.
App core (Nasdaq Data Link)
components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs
Implements authenticated HTTP helpers, endpoints for table metadata/data, dynamic propDefinitions (publisher, table, columns), and a generic paginate helper. Removes legacy authKeys.
Utilities
components/nasdaq_data_link_time_series_and_table_data_/common/utils.mjs
Adds parseJson utility to safely parse JSON-like strings within nested structures.
Packaging
components/nasdaq_data_link_time_series_and_table_data_/package.json
Bumps version to 0.1.0 and adds dependency on @pipedream/platform ^3.1.0.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Action as Get Table Data Action
  participant App as Nasdaq DL App
  participant API as Nasdaq API

  User->>Action: Run with publisher/table, columns, filters
  Action->>App: paginate(fn=tableData, args)
  loop Up to maxRequests (default 3)
    App->>API: GET /datatables/{publisher}/{table}.json<br/>params: filters, qopts.columns, per_page=100, cursor
    API-->>App: rows[], meta.next_cursor_id
    App-->>App: Accumulate rows
  end
  App-->>Action: Combined rows[]
  Action-->>User: Summary with record count + data
Loading
sequenceDiagram
  autonumber
  actor User
  participant Action as Export Table Action
  participant App as Nasdaq DL App
  participant API as Nasdaq API

  User->>Action: Run with publisher/table, columns, filters
  Action->>App: tableData(qopts.export=true, filters, qopts.columns)
  App->>API: GET /datatables/{publisher}/{table}.json
  API-->>App: datatable_bulk_download { status, link? }
  App-->>Action: Response
  Action-->>User: Summary based on status (fresh/creating/regenerating)
Loading
sequenceDiagram
  autonumber
  actor User
  participant Action as Get Table Metadata Action
  participant App as Nasdaq DL App
  participant API as Nasdaq API

  User->>Action: Run with publisher/table
  Action->>App: tableMetadata(publisher, table)
  App->>API: GET /datatables/{publisher}/{table}/metadata.json
  API-->>App: Metadata (columns, types, etc.)
  App-->>Action: Response
  Action-->>User: Success summary + metadata
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~55 minutes

Assessment against linked issues

Objective Addressed Explanation
Metadata retrieval tools for Nasdaq Data Link tables [#17846]
Table data retrieval (with filtering/pagination) [#17846]
Dataset search capability [#17846] No search endpoints or actions added.
Time-series data pull tools (non-table time series) [#17846] No time-series API wrappers or actions implemented.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Version bump and dependency addition (components/.../package.json) Likely in-scope for releasing new actions; not clearly out of scope. No unrelated functional changes identified.

Poem

A rabbit taps keys with a gentle thrum,
Tables and metadata—oh, here they come!
Exports zipped tidy, downloads on cue,
Paginated carrots of rows to chew.
I twitch my ears at datasets vast—
Time-series next, we’ll fetch them fast! 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 51052f7 and 04d1c30.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/common/utils.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs
  • components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs
  • components/nasdaq_data_link_time_series_and_table_data_/package.json
  • components/nasdaq_data_link_time_series_and_table_data_/common/utils.mjs
  • components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs
  • components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nasdaq-new-components

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (7)
components/nasdaq_data_link_time_series_and_table_data_/package.json (1)

15-17: Dependency looks appropriate; consider pinning strategy and adding metadata.

  • Adding @pipedream/platform is expected for modern components.
  • Consider adding repository and license fields for better package hygiene.
  • If reproducibility is a concern, consider pinning to a specific minor (e.g., "~3.1.0") or keeping "^" but verifying compatibility in CI when 3.x updates land.
   "author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/PipedreamHQ/pipedream"
+  },
+  "license": "MIT",
   "publishConfig": {
     "access": "public"
   },
   "dependencies": {
     "@pipedream/platform": "^3.1.0"
   }
components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs (1)

31-39: Optional: add targeted error handling for 404 to improve UX.
Letting errors bubble is fine, but a concise summary on 404 helps users correct publisher/table typos quickly.

-    const response = await app.tableMetadata({
-      $,
-      publisher,
-      table,
-    });
+    let response;
+    try {
+      response = await app.tableMetadata({
+        $,
+        publisher,
+        table,
+      });
+    } catch (err) {
+      if (err?.response?.status === 404) {
+        $.export("$summary", `Table \`${publisher}/${table}\` was not found`);
+      }
+      throw err;
+    }
components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs (1)

59-76: Consider exposing perPage/maxPages as optional props for flexibility.
This would let users tune throughput vs. rate limits without editing the shared app.

   props: {
     app,
+    perPage: {
+      type: "integer",
+      label: "Rows per Page",
+      description: "Optional. Overrides the default rows per page used by the app (qopts.per_page).",
+      optional: true,
+      default: undefined,
+    },
+    maxPages: {
+      type: "integer",
+      label: "Max Pages",
+      description: "Optional. Limit the number of pages to fetch.",
+      optional: true,
+      default: undefined,
+    },

And pass through in paginate args if defined.

components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs (1)

79-87: Avoid asserting link TTL; handle failure status explicitly.
Unless guaranteed by docs, avoid stating “valid for 30 minutes.” Also cover a possible “failed” status.

-    if (status === "fresh" && link) {
-      $.export("$summary", `Table ${publisher}/${table} is ready for download. The download link is valid for 30 minutes.`);
-
-    } else if (status === "creating" || status === "regenerating") {
+    if (status === "fresh" && link) {
+      $.export("$summary", `Table ${publisher}/${table} is ready for download.`);
+    } else if (status === "creating" || status === "regenerating") {
       $.export("$summary", `Export job for table ${publisher}/${table} is ${status}. Please retry in a few moments to get the download link.`);
 
-    } else {
+    } else if (status === "failed") {
+      $.export("$summary", `Export job for table ${publisher}/${table} failed. Please adjust filters or retry later.`);
+    } else {
       $.export("$summary", `Export initiated for table ${publisher}/${table}`);
     }

If you prefer to keep the TTL claim, please confirm the current validity window in the Nasdaq docs and restore it with a citation inline in the code comment.

components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs (3)

22-34: Harden dynamic column options and improve UX

Wrap the metadata call in a try/catch so the UI doesn’t break if the API rejects/ratelimits or the user mistypes the codes. Also consider returning { label, value } with the column type for clarity.

Apply this diff:

       async options({
         publisher, table,
       }) {
         if (!publisher || !table) {
           return [];
         }
-        const { datatable: { columns } } = await this.tableMetadata({
-          publisher,
-          table,
-        });
-        return columns.map(({ name }) => name);
+        try {
+          const { datatable: { columns } = {} } = await this.tableMetadata({
+            publisher,
+            table,
+          });
+          return (columns || []).map(({ name, type }) => ({
+            label: `${name}${type ? ` (${type})` : ""}`,
+            value: name,
+          }));
+        } catch (err) {
+          // Avoid failing the prop UI when publisher/table are invalid or metadata is restricted
+          console.error("Failed to load column options", err?.response?.data ?? err?.message);
+          return [];
+        }
       },

73-105: Paginate defaults are conservative; consider configurability and safeguards

maxRequests defaults to 3 (≈300 rows at 100/page), which may be too shallow for many tables. Expose page limit (and possibly total row limit) via args, and surface minimal metadata (e.g., last cursor) for debugging. Optionally short-circuit if args.params already set a smaller qopts.per_page.

Example tweak within current structure:

-    async paginate({
-      fn, args = {}, maxRequests = 3,
-    } = {}) {
+    async paginate({
+      fn, args = {}, maxRequests = 10, maxRows,
+    } = {}) {
       let allData = [];
       let cursorId = null;
       let requestCount = 0;
       let hasMorePages = true;

       while (hasMorePages && requestCount < maxRequests) {
         const response = await fn({
           ...args,
           params: {
             ...args.params,
-            "qopts.per_page": 100,
+            "qopts.per_page": args?.params?.["qopts.per_page"] ?? 100,
             ...(cursorId
               ? {
                 "qopts.cursor_id": cursorId,
               }
               : undefined
             ),
           },
         });

         const pageData = response?.datatable?.data || [];
-        allData = allData.concat(pageData);
+        allData = maxRows
+          ? allData.concat(pageData).slice(0, maxRows)
+          : allData.concat(pageData);

         cursorId = response?.meta?.next_cursor_id;
-        hasMorePages = !!cursorId;
+        hasMorePages = !!cursorId && (!maxRows || allData.length < maxRows);
         requestCount++;
       }

       return allData;
     },

If you want, I can open a follow-up PR to add an optional maxRows prop to the action that calls paginate.


40-46: Confirm header-based auth is reliable across all endpoints

Nasdaq Data Link typically supports the X-Api-Token header, but some examples prefer the api_key query param. Keeping header-only is cleaner, but if you hit auth oddities, consider supporting both (while keeping debug off to avoid leaking secrets).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0c7d150 and 51052f7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/common/utils.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs (1 hunks)
  • components/nasdaq_data_link_time_series_and_table_data_/package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/nasdaq_data_link_time_series_and_table_data_/package.json
🧬 Code graph analysis (3)
components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs (2)
components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs (1)
  • response (59-76)
components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs (1)
  • response (82-94)
components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs (2)
components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs (1)
  • response (59-74)
components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs (1)
  • response (82-94)
components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs (4)
components/keboola/actions/update-table-name/update-table-name.mjs (1)
  • table (35-37)
components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs (1)
  • response (59-74)
components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs (1)
  • response (59-76)
components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs (1)
  • response (31-35)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (6)
components/nasdaq_data_link_time_series_and_table_data_/package.json (2)

3-3: Version bump aligns with new features — good release discipline.
Incrementing to 0.1.0 is appropriate given the addition of multiple new actions and utilities.


1-18: Confirmed: no built-in Node modules added as dependencies.
This aligns with prior guidance for Pipedream components (no fs, path, etc., in dependencies). Carry on.

components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-metadata/get-table-metadata.mjs (1)

37-38: LGTM: clear, user-friendly summary on success.
The success summary concisely reflects the action outcome.

components/nasdaq_data_link_time_series_and_table_data_/actions/get-table-data/get-table-data.mjs (1)

78-79: Nice UX touch on the summary.
Returning the count is helpful for users composing workflows.

components/nasdaq_data_link_time_series_and_table_data_/actions/export-table/export-table.mjs (1)

59-75: LGTM overall: parameters align with Nasdaq bulk export expectations.
Using qopts.export and optional qopts.columns matches the Tables API semantics.

components/nasdaq_data_link_time_series_and_table_data_/nasdaq_data_link_time_series_and_table_data_.app.mjs (1)

1-1: LGTM: Correct Pipedream axios import

Using axios from "@pipedream/platform" is the right choice here.

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jcortes, LGTM! Ready for QA!

@vunguyenhung vunguyenhung merged commit 3d233f7 into master Aug 27, 2025
10 checks passed
@vunguyenhung vunguyenhung deleted the nasdaq-new-components branch August 27, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ACTION] Make tools available for the Nasdaq Data Link (Time Series and Table data) MCP Server
3 participants