Skip to content

Commit

Permalink
Merge pull request #1054 from swirlai/snowflake-etc
Browse files Browse the repository at this point in the history
Revise snowflake SQL query, stop dedupe of bigquery via mapping
  • Loading branch information
erikspears authored Dec 15, 2023
2 parents 81cbf80 + 48c89ae commit 2372506
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SearchProviders/company_snowflake.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"authenticator": "",
"connector": "Snowflake",
"url": "<snowflake-instance-address>",
"query_template": "SELECT {fields} FROM {table} WHERE {field1} ILIKE '%{query_string}%';",
"query_template": "SELECT {fields} FROM {table} WHERE {field1} ILIKE '%{query_string}%' AND NULLIF(TRIM(founded), '') IS NOT NULL ORDER BY TRY_TO_NUMBER(REGEXP_REPLACE(SPLIT_PART(size, '-', 1), '[^0-9]', '')) DESC;",
"post_query_template": {},
"http_request_headers": {},
"page_fetch_config_json": {},
Expand Down
2 changes: 1 addition & 1 deletion SearchProviders/funding_db_bigquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"MappingResultProcessor",
"CosineRelevancyResultProcessor"
],
"result_mappings": "title='{company}',body='{company} raised ${raisedamt} series {round} on {fundeddate}. The company is located in {city} {state} and has {numemps} employees.',url=permalink,date_published=fundeddate,NO_PAYLOAD",
"result_mappings": "title='{company}',body='{company} raised ${raisedamt} series {round} on {fundeddate}. The company is located in {city} {state} and has {numemps} employees.',url=id,date_published=fundeddate,NO_PAYLOAD",
"credentials": "/path/to/bigquery/token.json",
"tags": [
"Company",
Expand Down
4 changes: 2 additions & 2 deletions SearchProviders/preloaded.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
"CosineRelevancyResultProcessor"
],
"response_mappings": "",
"result_mappings": "title='{company}',body='{company} raised ${raisedamt} series {round} on {fundeddate}. The company is located in {city} {state} and has {numemps} employees.',url=permalink,date_published=fundeddate,NO_PAYLOAD",
"result_mappings": "title='{company}',body='{company} raised ${raisedamt} series {round} on {fundeddate}. The company is located in {city} {state} and has {numemps} employees.',url=id,date_published=fundeddate,NO_PAYLOAD",
"results_per_query": 10,
"credentials": "/path/to/bigquery/token.json",
"tags": [
Expand Down Expand Up @@ -1393,7 +1393,7 @@
"authenticator": "",
"connector": "Snowflake",
"url": "<snowflake-instance-address>",
"query_template": "SELECT {fields} FROM {table} WHERE {field1} ILIKE '%{query_string}%';",
"query_template": "SELECT {fields} FROM {table} WHERE {field1} ILIKE '%{query_string}%' AND NULLIF(TRIM(founded), '') IS NOT NULL ORDER BY TRY_TO_NUMBER(REGEXP_REPLACE(SPLIT_PART(size, '-', 1), '[^0-9]', '')) DESC;",
"post_query_template": {},
"http_request_headers": {},
"page_fetch_config_json": {},
Expand Down
Binary file modified db.sqlite3.dist
Binary file not shown.

0 comments on commit 2372506

Please sign in to comment.