- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.5k
 
Databricks vector search endpoints #18256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            5 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      fe341ea
              
                Add vector search endpoint actions and update package version
              
              
                luancazarine a0b5964
              
                pnpm update
              
              
                luancazarine d9adc6c
              
                Merge branch 'master' into databricks-vector-search-endpoints
              
              
                luancazarine 8c4cf2d
              
                Update Databricks SQL Warehouse actions and versions
              
              
                luancazarine 3db9991
              
                Increment package version to 0.3.0 for @pipedream/databricks
              
              
                luancazarine File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
        
          
          
            37 changes: 37 additions & 0 deletions
          
          37 
        
  components/databricks/actions/create-endpoint/create-endpoint.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import databricks from "../../databricks.app.mjs"; | ||
| 
     | 
||
| export default { | ||
| key: "databricks-create-endpoint", | ||
| name: "Create Endpoint", | ||
| description: "Create a new vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/createendpoint)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| databricks, | ||
| name: { | ||
| type: "string", | ||
| label: "Endpoint Name", | ||
| description: "The name of the vector search endpoint", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| try { | ||
| const response = await this.databricks.createEndpoint({ | ||
| data: { | ||
| name: this.name, | ||
| endpoint_type: "STANDARD", | ||
| }, | ||
| $, | ||
| }); | ||
| 
     | 
||
| if (response) { | ||
| $.export("$summary", `Successfully created endpoint with ID ${response.id}.`); | ||
| } | ||
| 
     | 
||
| return response; | ||
| } catch ({ response }) { | ||
| throw new ConfigurationError(response.data.message); | ||
| } | ||
| }, | ||
| }; | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            27 changes: 27 additions & 0 deletions
          
          27 
        
  components/databricks/actions/delete-endpoint/delete-endpoint.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import databricks from "../../databricks.app.mjs"; | ||
| 
     | 
||
| export default { | ||
| key: "databricks-delete-endpoint", | ||
| name: "Delete Endpoint", | ||
| description: "Delete a vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/deleteendpoint)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| databricks, | ||
| endpointName: { | ||
| propDefinition: [ | ||
| databricks, | ||
| "endpointName", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.databricks.deleteEndpoint({ | ||
| endpointName: this.endpointName, | ||
| $, | ||
| }); | ||
| 
     | 
||
| $.export("$summary", `Successfully deleted endpoint "${this.endpointName}".`); | ||
| return response; | ||
| }, | ||
| }; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            30 changes: 30 additions & 0 deletions
          
          30 
        
  components/databricks/actions/get-endpoint/get-endpoint.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import databricks from "../../databricks.app.mjs"; | ||
| 
     | 
||
| export default { | ||
| key: "databricks-get-endpoint", | ||
| name: "Get Endpoint", | ||
| description: "Get details of a specific vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/getendpoint)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| databricks, | ||
| endpointName: { | ||
| propDefinition: [ | ||
| databricks, | ||
| "endpointName", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.databricks.getEndpoint({ | ||
| endpointName: this.endpointName, | ||
| $, | ||
| }); | ||
| 
     | 
||
| if (response) { | ||
| $.export("$summary", `Successfully retrieved endpoint "${this.endpointName}".`); | ||
| } | ||
| 
     | 
||
| return response; | ||
| }, | ||
| }; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            45 changes: 45 additions & 0 deletions
          
          45 
        
  components/databricks/actions/list-endpoints/list-endpoints.mjs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import databricks from "../../databricks.app.mjs"; | ||
| 
     | 
||
| export default { | ||
| key: "databricks-list-endpoints", | ||
| name: "List Endpoints", | ||
| description: "List all vector search endpoints. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/listendpoints)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| databricks, | ||
| maxResults: { | ||
| type: "integer", | ||
| label: "Max Results", | ||
| description: "Maximum number of endpoints to return", | ||
| default: 100, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const allEndpoints = []; | ||
| const params = {}; | ||
| 
     | 
||
| do { | ||
| const { | ||
| endpoints, next_page_token, | ||
| } = await this.databricks.listEndpoints({ | ||
| params, | ||
| $, | ||
| }); | ||
| 
     | 
||
| allEndpoints.push(...endpoints); | ||
| if (!next_page_token) break; | ||
| params.page_token = next_page_token; | ||
| } while (allEndpoints.length < this.maxResults); | ||
                
      
                  luancazarine marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| if (allEndpoints.length > this.maxResults) { | ||
| allEndpoints.length = this.maxResults; | ||
| } | ||
| 
     | 
||
| $.export("$summary", `Successfully retrieved ${allEndpoints.length} endpoint${allEndpoints.length === 1 | ||
| ? "" | ||
| : "s"}.`); | ||
| 
     | 
||
| return allEndpoints; | ||
| }, | ||
| }; | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.