### Snowflake SQL ALTER SHARE Syntax Examples Source: https://docs.snowflake.com/en/sql-reference/sql/alter-share.html Demonstrates various ways to use the ALTER SHARE command in Snowflake SQL. This includes adding or removing accounts, setting a new list of accounts, and managing share restrictions and tags. ```sql ALTER SHARE share_name ADD ACCOUNTS = account1, account2; ALTER SHARE share_name REMOVE ACCOUNTS = account1; ALTER SHARE share_name SET ACCOUNTS = account3, account4; ALTER SHARE share_name SET SHARE_RESTRICTIONS = FALSE; ALTER SHARE share_name SET TAG = 'tag_name' = 'tag_value'; ALTER SHARE share_name UNSET COMMENT; ``` -------------------------------- ### Snowflake Share Setup (AWS_US_EAST_1) Source: https://docs.sumble.com/enterprise-services/integrations/snowflake-share Instructions for creating and configuring a Snowflake data share when your region is AWS_US_EAST_1. This involves creating a share, granting access to database objects, and adding Sumble's account to the share. Sumble will then accept the share and create a database from it. ```sql CREATE SHARE my_share; GRANT USAGE ON DATABASE my_database TO SHARE my_share; GRANT SELECT ON SCHEMA my_database.my_schema TO SHARE my_share; GRANT SELECT ON TABLE my_database.my_schema.my_table TO SHARE my_share; ALTER SHARE my_share ADD ACCOUNT = SUMBLE.AWS_US_EAST_1; ``` -------------------------------- ### Set Comment for Snowflake Share Source: https://docs.snowflake.com/en/sql-reference/sql/alter-share.html Provides an example of how to set or update the comment associated with a Snowflake share. Comments are useful for describing the purpose of the share. ```sql ALTER SHARE sales_s SET COMMENT='This share contains sales data for 2017'; ``` -------------------------------- ### Find Job Listings with Filters (JSON) Source: https://context7_llms This snippet demonstrates how to make a POST request to the `/v3/jobs/find` endpoint to search for job listings. It includes optional parameters for organization, technologies, countries, and date filters. The response provides a list of jobs, credits used, and remaining credits. ```json { "openapi": "3.1.0", "info": { "title": "Sumble API", "version": "v3" }, "servers": [ { "url": "https://api.sumble.com" } ], "security": [ { "api_token": [] } ], "components": { "securitySchemes": { "api_token": { "type": "http", "scheme": "bearer" } }, "schemas": { "FindJobsRequest": { "properties": { "organization": { "anyOf": [ {"$ref": "#/components/schemas/app__schemas__paid_api__match__OrganizationByDomain"}, {"$ref": "#/components/schemas/app__schemas__paid_api__match__OrganizationById"}, {"$ref": "#/components/schemas/app__schemas__paid_api__match__OrganizationBySlug"}, { "type": "null" } ], "title": "Organization", "description": "Organization to enrich" }, "filters": { "anyOf": [ {"$ref": "#/components/schemas/app__schemas__paid_api__jobs__FindJobsRequest__Filters"}, {"$ref": "#/components/schemas/app__schemas__paid_api__query__Query"} ], "title": "Filters", "description": "Filters to apply to the jobs search. Can be either a Filters object or a Query object." }, "limit": { "type": "integer", "maximum": 100, "minimum": 1, "title": "Limit", "description": "Maximum number of people to return", "default": 10 }, "offset": { "type": "integer", "maximum": 10000, "minimum": 0, "title": "Offset", "description": "Number of results to skip", "default": 0 } }, "type": "object", "required": [ "filters" ], "title": "FindJobsRequest" }, "app__schemas__paid_api__match__OrganizationByDomain": { "properties": { "domain": { "type": "string", "title": "Domain", "description": "Company web domain" } }, "type": "object", "required": [ "domain" ], "title": "OrganizationByDomain" }, "app__schemas__paid_api__match__OrganizationById": { "properties": { "id": { "type": "integer", "title": "Id", "description": "Organization Id on Sumble" } }, "type": "object", "required": [ "id" ], "title": "OrganizationById" }, "app__schemas__paid_api__match__OrganizationBySlug": { "properties": { "slug": { "type": "string", "title": "Slug", "description": "Organization Slug on Sumble" } }, "type": "object", "required": [ "slug" ], "title": "OrganizationBySlug" }, "app__schemas__paid_api__jobs__FindJobsRequest__Filters": { "properties": { "technologies": { "items": { "type": "string" }, "type": "array", "title": "Technologies", "description": "Technologies to search for", "default": [] }, "technology_categories": { "items": { "type": "string" }, "type": "array", "title": "Technology Categories", "description": "Technology categories to search for", "default": [] }, "countries": { "items": { "type": "string" }, "type": "array", "title": "Countries", "description": "Countries to filter by (e.g. US, CA)", "default": [] }, "since": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Since", "description": "Only consider data since this date. Format: YYYY-MM-DD" } }, "type": "object", "title": "Filters" }, "app__schemas__paid_api__query__Query": { "properties": { "query": { "type": "string", "title": "Query" } }, "type": "object", "required": [ "query" ], "title": "Query" }, "FindJobsResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "credits_used": { "type": "integer", "title": "Credits Used" }, "credits_remaining": { "type": "integer", "title": "Credits Remaining" }, "jobs": { "items": {"$ref": "#/components/schemas/Job"}, "type": "array", "title": "Jobs" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "id", "credits_used", "credits_remaining", "jobs", "total" ], "title": "FindJobsResponse" }, "Job": { "properties": { "id": { "type": "integer", "title": "Id" }, "organization_id": { "type": "integer", "title": "Organization Id" }, "organization_name": { "type": "string", "title": "Organization Name" }, "organization_domain": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organization Domain" }, "job_title": { "type": "string", "title": "Job Title" }, "datetime_pulled": { "type": "string", "format": "date-time", "title": "Datetime Pulled" }, "primary_job_function": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Primary Job Function" }, "location": { "type": "string", "title": "Location" }, "teams": { "type": "string", "title": "Teams" }, "matched_projects": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Matched Projects" }, "projects_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Projects Description" }, "matched_technologies": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Matched Technologies" }, "matched_job_functions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Matched Job Functions" }, "projects": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Projects" }, "description": { "type": "string", "title": "Description" }, "url": { "type": "string", "title": "Url" } }, "type": "object", "required": [ "id", "organization_id", "organization_name", "organization_domain", "job_title", "datetime_pulled", "primary_job_function", "location", "teams", "matched_projects", "projects_description", "matched_technologies", "matched_job_functions", "projects", "description", "url" ], "title": "Job" }, "HTTPValidationError": { "properties": { "detail": { "items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "titl } } } } } } ``` -------------------------------- ### Configure Application Package Refresh with ALTER APPLICATION PACKAGE Source: https://other-docs.snowflake.com/en/collaboration/provider-listings-auto-fulfillment For listings with data products as application packages, providers can configure automatic refreshes. The LISTING_AUTO_REFRESH clause within the ALTER APPLICATION PACKAGE command allows setting up refreshes to occur automatically each time a release directive is modified, simplifying update management. ```sql ALTER APPLICATION PACKAGE your_app_package_name SET LISTING_AUTO_REFRESH = TRUE; ``` -------------------------------- ### Create an Empty Share in Snowflake SQL Source: https://docs.snowflake.com/en/sql-reference/sql/create-share.html This snippet demonstrates how to create a new, empty data share using the CREATE SHARE command in Snowflake SQL. The share is named 'sales_s'. After creation, you would typically use GRANT commands to add databases and objects, and ALTER SHARE to add accounts. ```sql CREATE SHARE sales_s; ``` -------------------------------- ### Trigger On-Demand Data Refresh using SQL Source: https://other-docs.snowflake.com/en/collaboration/provider-listings-auto-fulfillment Providers can use the SYSTEM$TRIGGER_LISTING_REFRESH function in SQL to manually trigger an on-demand data refresh for their listings. This ensures consumers receive the most current information immediately after upstream data processing is complete. It's recommended for scenarios where data is updated asynchronously. ```sql SELECT SYSTEM$TRIGGER_LISTING_REFRESH('your_listing_id'); ``` -------------------------------- ### CREATE SHARE API Source: https://docs.snowflake.com/en/sql-reference/sql/create-share.html Creates a new, empty share. Shares are used to share databases and objects within Snowflake. ```APIDOC ## CREATE SHARE ### Description Creates a new, empty share. Once the share is created, you can include a database and objects from the database (schemas, tables, and views) in the share using the GRANT … TO SHARE command. You can then use ALTER SHARE to add one or more accounts to the share. ### Method SQL Command ### Endpoint N/A (SQL Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql CREATE SHARE sales_s; ``` ### Response #### Success Response (200) - **status** (string) - Confirmation message indicating the share was successfully created. #### Response Example ```json { "status": "Share SALES_S successfully created." } ``` ### Usage Notes - The `OR REPLACE` and `IF NOT EXISTS` clauses are mutually exclusive. - `CREATE OR REPLACE ` statements are atomic. ``` -------------------------------- ### Authenticate API Request with Bearer Token (Bash) Source: https://context7_llms This snippet demonstrates how to authenticate an API request to the Sumble API using an API key as a Bearer token in the Authorization header. It includes setting the content type and sending JSON data. ```bash curl https://api.sumble.com/v3/organizations/enrich \ --request POST \ --header "Authorization: Bearer $API_KEY" \ --header 'Content-Type: application/json' \ --data '{ \ "organization": { \ "domain": "sumble.com" \ }, \ "filters": { \ "technologies": [ \ "python" \ ] \ } \ }' ``` -------------------------------- ### Retrieve Job Posts Source: https://context7_llms This endpoint allows retrieving job posts for a given filter. It can be scoped to a particular organization or not. Calls to this endpoint consume credits, the cost of a particular request depends on the number of jobs retrieved. Each job costs 3 credits. ```json { "post": { "summary": "_api_version__organizations_enrich_post", "operationId": "_api_version__organizations_enrich_post", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnrichRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnrichResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } ``` -------------------------------- ### POST /v3/jobs/find Source: https://context7_llms Find job listings based on various criteria. This endpoint allows you to search for jobs by specifying technologies, countries, and other filters. ```APIDOC ## POST /v3/jobs/find ### Description Find job listings based on specified criteria. This endpoint allows for detailed filtering of job postings. ### Method POST ### Endpoint /v3/jobs/find ### Parameters #### Query Parameters None #### Request Body - **organization** (object | null) - Optional - The organization to enrich. Can be specified by domain, ID, or slug. - **domain** (string) - Required if organization is specified by domain - Company web domain. - **id** (integer) - Required if organization is specified by ID - Organization Id on Sumble. - **slug** (string) - Required if organization is specified by slug - Organization Slug on Sumble. - **filters** (object) - Required - Filters to apply to the jobs search. Can be either a Filters object or a Query object. - **technologies** (array of strings) - Optional - Technologies to search for. Defaults to an empty array. - **technology_categories** (array of strings) - Optional - Technology categories to search for. Defaults to an empty array. - **countries** (array of strings) - Optional - Countries to filter by (e.g. US, CA). Defaults to an empty array. - **since** (string | null) - Optional - Only consider data since this date. Format: YYYY-MM-DD. - **query** (string) - Required if filters is a Query object - The search query string. - **limit** (integer) - Optional - Maximum number of results to return. Defaults to 10. Max value is 100. - **offset** (integer) - Optional - Number of results to skip. Defaults to 0. Max value is 10000. ### Request Example ```json { "organization": { "domain": "example.com" }, "filters": { "technologies": ["python", "react"], "countries": ["US"], "since": "2023-01-01" }, "limit": 20, "offset": 0 } ``` ### Response #### Success Response (200) - **id** (string, uuid) - Unique identifier for the request. - **credits_used** (integer) - Number of credits used for this request. - **credits_remaining** (integer) - Number of credits remaining. - **jobs** (array of Job objects) - A list of job objects matching the search criteria. - **total** (integer) - The total number of jobs found matching the criteria. #### Job Object - **id** (integer) - Job ID. - **organization_id** (integer) - Organization ID. - **organization_name** (string) - Name of the organization. - **organization_domain** (string | null) - Domain of the organization. - **job_title** (string) - Title of the job. - **datetime_pulled** (string, date-time) - Timestamp when the job was pulled. - **primary_job_function** (string | null) - Primary job function. - **location** (string) - Job location. - **teams** (string) - Teams associated with the job. - **matched_projects** (string | null) - Description of matched projects. - **projects_description** (string | null) - Description of projects. - **matched_technologies** (string | null) - Matched technologies. - **matched_job_functions** (string | null) - Matched job functions. - **projects** (string | null) - Projects details. - **description** (string) - Job description. - **url** (string) - URL to the job listing. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "credits_used": 1, "credits_remaining": 99, "jobs": [ { "id": 12345, "organization_id": 678, "organization_name": "Tech Solutions Inc.", "organization_domain": "techsolutions.com", "job_title": "Senior Software Engineer", "datetime_pulled": "2023-10-27T10:00:00Z", "primary_job_function": "Engineering", "location": "San Francisco, CA", "teams": "Backend", "matched_projects": "Developing scalable microservices.", "projects_description": "This role involves building and maintaining our core platform services.", "matched_technologies": "Java, Spring Boot", "matched_job_functions": "Backend Development", "projects": "Microservices architecture", "description": "We are looking for a skilled Senior Software Engineer to join our dynamic team...", "url": "https://jobs.example.com/12345" } ], "total": 100 } ``` #### Error Response (422) - **detail** (array of ValidationError objects) - Details about the validation errors. #### ValidationError Object - **loc** (array) - Location of the error in the request. - **msg** (string) - Error message. - **type** (string) - Error type. #### Error Response Example ```json { "detail": [ { "loc": ["body", "limit"], "msg": "ensure this value is less than or equal to 100", "type": "value_error.number.max" } ] } ``` ``` -------------------------------- ### Add Accounts to Snowflake Share Source: https://docs.snowflake.com/en/sql-reference/sql/alter-share.html Demonstrates how to add one or more accounts to an existing Snowflake share. This operation requires appropriate privileges on the share. ```sql ALTER SHARE sales_s ADD ACCOUNTS=account1, account2; ``` -------------------------------- ### Grant MANAGE SHARE TARGET and Alter Share Source: https://docs.snowflake.com/en/sql-reference/sql/alter-share.html Shows the process of granting the MANAGE SHARE TARGET privilege to a role, then using that role to alter a share by adding accounts. This involves multiple SQL statements. ```sql GRANT MANAGE SHARE TARGET ON ACCOUNT TO ROLE manage_role; GRANT ROLE manage_role TO USER user_name; USE ROLE manage_role; ALTER SHARE sales_s ADD ACCOUNTS = account1, account2; ``` -------------------------------- ### Set Account-Level Interval-Based Data Refresh Source: https://other-docs.snowflake.com/en/collaboration/provider-listings-auto-fulfillment Providers can configure an interval-based data refresh for all consumers of a listing, with intervals ranging from one minute to eight days. This is ideal for maintaining a regular cadence of updates across all associated listings and databases. This feature is accessible via SQL or Provider Studio. ```sql ALTER ACCOUNT SET LISTING_REFRESH_INTERVAL = '1_hour'; ``` -------------------------------- ### Find Job Listings Source: https://context7_llms This endpoint allows you to search and find job listings based on specified criteria. The response includes details of the jobs that match your query. ```APIDOC ## POST /v3/jobs/find ### Description Find job listings based on provided criteria. ### Method POST ### Endpoint /v3/jobs/find ### Parameters #### Query Parameters None #### Request Body - **job_id** (string) - Optional - The ID of the job to find. - **company_id** (string) - Optional - The ID of the company to find jobs for. - **keywords** (string) - Optional - Keywords to search for in job titles or descriptions. - **location** (string) - Optional - The location to search for jobs. - **min_salary** (number) - Optional - The minimum salary for the job. - **max_salary** (number) - Optional - The maximum salary for the job. - **job_type** (string) - Optional - The type of job (e.g., "full-time", "part-time"). - **sort_by** (string) - Optional - The field to sort the results by (e.g., "relevance", "date_posted"). - **sort_order** (string) - Optional - The order to sort the results ("asc" or "desc"). ### Request Example ```json { "keywords": "Software Engineer", "location": "San Francisco", "job_type": "full-time" } ``` ### Response #### Success Response (200) - **jobs** (array) - A list of job objects matching the criteria. - **job_id** (string) - The unique identifier for the job. - **title** (string) - The title of the job. - **company_name** (string) - The name of the company offering the job. - **location** (string) - The location of the job. - **salary_min** (number) - The minimum salary for the job. - **salary_max** (number) - The maximum salary for the job. - **job_type** (string) - The type of job. - **date_posted** (string) - The date the job was posted. #### Response Example ```json { "jobs": [ { "job_id": "job-123", "title": "Senior Software Engineer", "company_name": "Tech Corp", "location": "San Francisco, CA", "salary_min": 120000, "salary_max": 160000, "job_type": "full-time", "date_posted": "2023-10-27" } ] } ``` #### Error Response (422) - **detail** (array) - A list of validation errors. - **loc** (array) - The location of the error. - **msg** (string) - The error message. - **type** (string) - The type of error. #### Error Example ```json { "detail": [ { "loc": ["body", "keywords"], "msg": "field required", "type": "value_error.missing" } ] } ``` ``` -------------------------------- ### POST /v3/people/find Source: https://context7_llms Find people at an organization by providing a request body with search criteria. ```APIDOC ## POST /v3/people/find ### Description Find people at an organization by providing a request body with search criteria. ### Method POST ### Endpoint /v3/people/find ### Parameters #### Query Parameters None #### Request Body - **name** (string) - Optional - The name of the person to find. - **department** (string) - Optional - The department the person belongs to. - **job_title** (string) - Optional - The job title of the person. - **limit** (integer) - Optional - The maximum number of results to return. - **offset** (integer) - Optional - The number of results to skip. ### Request Example ```json { "name": "John Doe", "department": "Engineering", "limit": 10, "offset": 0 } ``` ### Response #### Success Response (200) - **people** (array) - A list of people found matching the criteria. - **name** (string) - The name of the person. - **department** (string) - The department the person belongs to. - **job_title** (string) - The job title of the person. #### Response Example ```json { "people": [ { "name": "John Doe", "department": "Engineering", "job_title": "Software Engineer" }, { "name": "Jane Smith", "department": "Engineering", "job_title": "Senior Software Engineer" } ] } ``` #### Error Response (422) - **detail** (array) - Details about the validation error. - **loc** (array) - The location of the error in the request. - **msg** (string) - The error message. - **type** (string) - The type of error. ```