Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
0499160
init
lovincyrus Jan 13, 2026
66d88a7
rm yupSchema
lovincyrus Jan 13, 2026
8a98d71
rm references
lovincyrus Jan 13, 2026
40c42bb
rm clickhouse form, clean up
lovincyrus Jan 13, 2026
2840aac
ts fix
lovincyrus Jan 13, 2026
071ef30
add connector schemas, duh
lovincyrus Jan 13, 2026
48f45a2
clean up
lovincyrus Jan 13, 2026
00b1939
rm unused
lovincyrus Jan 13, 2026
ec93963
e2e fix
lovincyrus Jan 13, 2026
a82c999
step 2 form reset
lovincyrus Jan 14, 2026
7658062
connector instance name for create secrets from connectors
lovincyrus Jan 14, 2026
cdbec9d
test for model reset e2e
lovincyrus Jan 14, 2026
1cab5cd
snowflake e2e
lovincyrus Jan 14, 2026
d665116
e2e test for create secrets from connectors
lovincyrus Jan 14, 2026
8b008e8
reset error on input change
lovincyrus Jan 14, 2026
6fbc1f4
bigquery nit
lovincyrus Jan 14, 2026
40be33a
remove clickhouse form
lovincyrus Jan 16, 2026
fafc51c
remove ref for connector driver property in form renderer
lovincyrus Jan 16, 2026
661df99
Revert "remove clickhouse form"
lovincyrus Jan 16, 2026
02dd227
clickhouse revert
lovincyrus Jan 16, 2026
67e67cc
tabs and clickhouse renderer changes
lovincyrus Jan 16, 2026
6b2ac93
clickhouse grouped fields, renderer
lovincyrus Jan 16, 2026
171dbdd
prettier
lovincyrus Jan 16, 2026
28b0f04
remove configProperties/sourceProperties references
lovincyrus Jan 16, 2026
098d240
no longer gets initial values from drivers props
lovincyrus Jan 16, 2026
4047989
set internals in schemas
lovincyrus Jan 16, 2026
6a055e4
lint, prettier
lovincyrus Jan 16, 2026
857f85f
fallback secret_secrets_from_connectors
lovincyrus Jan 16, 2026
48ed8b3
explorer init
lovincyrus Jan 17, 2026
0b61be4
input for sql block, preview
lovincyrus Jan 17, 2026
2fb708b
explorer connector conditions
lovincyrus Jan 17, 2026
1983bc7
gcp credentials secret type
lovincyrus Jan 17, 2026
58faf0f
input multiline placeholder
lovincyrus Jan 17, 2026
114d50c
remove unused
lovincyrus Jan 17, 2026
a142176
prettier
lovincyrus Jan 17, 2026
2721929
re-order
lovincyrus Jan 17, 2026
da7e502
e2e fix
lovincyrus Jan 17, 2026
f521ffd
clickhouse cta and orders fix
lovincyrus Jan 17, 2026
aaa3692
clean up
lovincyrus Jan 17, 2026
66ba4b8
simplified with claude
lovincyrus Jan 20, 2026
d4e5dfc
type safety
lovincyrus Jan 20, 2026
986518c
add missing sql store explorer props
lovincyrus Jan 20, 2026
dadeaed
missing props to olap store
lovincyrus Jan 20, 2026
0b66c81
clickhouse cta validation, no model creation flow
lovincyrus Jan 20, 2026
82c61d3
fix previous type safety
lovincyrus Jan 20, 2026
34f4909
indexed rendering
lovincyrus Jan 20, 2026
99dde19
athena connector e2e
lovincyrus Jan 20, 2026
85c91d4
e2e
lovincyrus Jan 20, 2026
658186a
prettier
lovincyrus Jan 20, 2026
b6476b8
type safety
lovincyrus Jan 20, 2026
6ba6b25
remove olap connectors from explorer step
lovincyrus Jan 21, 2026
b356b51
create secrets from connector guard, from https
lovincyrus Jan 21, 2026
4393fce
exclude connector config from explorer, prettier
lovincyrus Jan 21, 2026
0772033
remove residual connector config from explorer model preview
lovincyrus Jan 21, 2026
80a7849
revert explorer guard, hide right sidebar
lovincyrus Jan 21, 2026
1cc6948
x-monospace
lovincyrus Jan 21, 2026
a7c5a4b
clickhouse cloud button
lovincyrus Jan 21, 2026
e12ed94
clickhouse cloud icon
lovincyrus Jan 21, 2026
ab482ca
comments in yaml model
lovincyrus Jan 21, 2026
773ab76
prettier
lovincyrus Jan 21, 2026
2b25cca
clean up
lovincyrus Jan 21, 2026
9d14768
remove properties to schema
lovincyrus Jan 22, 2026
93537ab
add missing placeholders
lovincyrus Jan 22, 2026
d0a5a57
prettier, lint
lovincyrus Jan 22, 2026
fdf12d4
lint
lovincyrus Jan 22, 2026
f831dc5
fix salesforce optional rendering
lovincyrus Jan 22, 2026
0ff4700
use schema default values
lovincyrus Jan 22, 2026
a191d5e
lint
lovincyrus Jan 22, 2026
b3f18c1
remove clickhosue default, use schema
lovincyrus Jan 22, 2026
0b8d09a
multiline placeholder
lovincyrus Jan 22, 2026
2fd9204
ts typecheck
lovincyrus Jan 22, 2026
70eb682
add title and x-category to json schemas
lovincyrus Jan 22, 2026
4ef70b9
connector driver helper, from json schema
lovincyrus Jan 22, 2026
13246a8
prettier
lovincyrus Jan 22, 2026
af12586
refactor clickhouse-specific logic from add data form
lovincyrus Jan 23, 2026
6e69cb4
fix explorer step form import data
lovincyrus Jan 23, 2026
241b363
prettier
lovincyrus Jan 23, 2026
5edbff4
refactor(forms): derive connector behavior from schema metadata
lovincyrus Jan 23, 2026
34009ec
refactor(forms): extract SuperForms initialization to factory function
lovincyrus Jan 23, 2026
9d4223d
refactor(forms): remove unused property filtering from manager
lovincyrus Jan 23, 2026
8256503
fix(sources): use duckdb connector for rewritten S3 models
lovincyrus Jan 24, 2026
83dc0d6
fix(sources): use duckdb connector for rewritten S3 models
lovincyrus Jan 24, 2026
9de98cd
clickhouse cloud icon
lovincyrus Jan 26, 2026
8918230
feat(schemas): add rill-managed option to ClickHouse Cloud connector
lovincyrus Jan 26, 2026
9269d31
remove rill-managed from clickhouse cloud
lovincyrus Jan 29, 2026
7002640
re-enable right panel for explorer step form
lovincyrus Jan 29, 2026
36e47e2
color fix clickhouse icon banner icon
lovincyrus Jan 29, 2026
25359c0
center the local file banner
lovincyrus Jan 29, 2026
dce93f2
infer model name from sql
lovincyrus Jan 29, 2026
a868dcc
salesforce icon
lovincyrus Jan 29, 2026
50305b5
prettier
lovincyrus Jan 29, 2026
a766c5a
bump reference doc file path
lovincyrus Jan 30, 2026
6af1201
rename
lovincyrus Jan 30, 2026
3e2edb9
rename
lovincyrus Jan 30, 2026
f83382c
rename
lovincyrus Jan 30, 2026
4b30fd2
rename
lovincyrus Jan 30, 2026
cf4b9c3
docs
lovincyrus Jan 30, 2026
9e6694f
refactor(AddDataFormManager): improve code clarity with comments and …
lovincyrus Jan 31, 2026
dbcb508
prettier
lovincyrus Jan 31, 2026
8d65402
prettier
lovincyrus Feb 2, 2026
e91d97f
duckdb managed
lovincyrus Feb 2, 2026
9b3e659
Revert "duckdb managed"
lovincyrus Feb 2, 2026
160807b
remove 'weird' font for sql
lovincyrus Feb 2, 2026
1edc896
muted multiline placeholder
lovincyrus Feb 2, 2026
7d97570
update docs ref comment for model creation
lovincyrus Feb 2, 2026
8c03fce
fix: exclude connection_mode from source/explorer YAML preview
lovincyrus Feb 3, 2026
652fc36
style: change multiline input placeholder color to muted
lovincyrus Feb 3, 2026
607da91
prettier
lovincyrus Feb 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions web-common/src/components/forms/Input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@
contenteditable
class="multiline-input"
class:pointer-events-none={disabled}
{placeholder}
data-placeholder={placeholder}
aria-label={label || title || placeholder}
role="textbox"
tabindex="0"
aria-multiline="true"
Expand Down Expand Up @@ -311,7 +312,7 @@
.multiline-input {
@apply p-0;
@apply size-full;
@apply outline-none border-0 placeholder-fg-secondary;
@apply outline-none border-0 placeholder-fg-muted;
@apply cursor-text;
vertical-align: middle;
}
Expand All @@ -331,6 +332,12 @@
word-wrap: break-word;
}

.multiline-input:empty::before {
content: attr(data-placeholder);
@apply text-fg-muted;
pointer-events: none;
}

.input-wrapper:focus-within {
@apply border-primary-500;
@apply ring-2 ring-primary-100;
Expand Down
46 changes: 46 additions & 0 deletions web-common/src/components/icons/connectors/ClickHouseCloud.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<svg
width="117"
height="29"
viewBox="0 0 117 29"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M46.896 4.8576C45.8688 4.8576 45.0672 5.2128 44.4912 5.9232C43.9152 6.624 43.6272 7.5888 43.6272 8.8176C43.6272 10.0368 43.896 10.9968 44.4336 11.6976C44.9712 12.3984 45.7872 12.7488 46.8816 12.7488C47.3232 12.7488 47.7456 12.7104 48.1488 12.6336C48.5616 12.5472 48.9792 12.4368 49.4016 12.3024V13.6416C48.9984 13.7952 48.5856 13.9056 48.1632 13.9728C47.7504 14.0496 47.2608 14.088 46.6944 14.088C45.6384 14.088 44.7648 13.872 44.0736 13.44C43.3824 12.9984 42.864 12.384 42.5184 11.5968C42.1728 10.8 42 9.8688 42 8.8032C42 7.7664 42.1872 6.8496 42.5616 6.0528C42.9456 5.256 43.5024 4.6368 44.232 4.1952C44.9616 3.744 45.8544 3.5184 46.9104 3.5184C47.4288 3.5184 47.9328 3.576 48.4224 3.6912C48.9216 3.7968 49.3776 3.9504 49.7904 4.152L49.2144 5.448C48.8784 5.2944 48.5136 5.16 48.12 5.0448C47.736 4.92 47.328 4.8576 46.896 4.8576ZM52.9701 13.944H51.4437V3H52.9701V13.944ZM56.1448 3.2304C56.3752 3.2304 56.5768 3.2976 56.7496 3.432C56.9224 3.5664 57.0088 3.792 57.0088 4.1088C57.0088 4.416 56.9224 4.6416 56.7496 4.7856C56.5768 4.92 56.3752 4.9872 56.1448 4.9872C55.8952 4.9872 55.684 4.92 55.5112 4.7856C55.348 4.6416 55.2664 4.416 55.2664 4.1088C55.2664 3.792 55.348 3.5664 55.5112 3.432C55.684 3.2976 55.8952 3.2304 56.1448 3.2304ZM56.8936 6.1824V13.944H55.3672V6.1824H56.8936ZM62.4154 14.088C61.3402 14.088 60.4762 13.7712 59.8234 13.1376C59.1706 12.4944 58.8442 11.4864 58.8442 10.1136C58.8442 9.1536 59.0026 8.376 59.3194 7.7808C59.6362 7.1856 60.073 6.7488 60.6298 6.4704C61.1866 6.1824 61.8202 6.0384 62.5306 6.0384C62.9626 6.0384 63.3658 6.0864 63.7402 6.1824C64.1242 6.2688 64.441 6.3696 64.6906 6.4848L64.2298 7.7232C63.961 7.6176 63.673 7.5264 63.3658 7.4496C63.0682 7.3728 62.785 7.3344 62.5162 7.3344C61.1146 7.3344 60.4138 8.256 60.4138 10.0992C60.4138 10.9824 60.5866 11.6544 60.9322 12.1152C61.2778 12.576 61.7866 12.8064 62.4586 12.8064C62.8906 12.8064 63.2698 12.7584 63.5962 12.6624C63.9322 12.5664 64.2394 12.4416 64.5178 12.288V13.6128C64.2394 13.776 63.937 13.896 63.6106 13.9728C63.2842 14.0496 62.8858 14.088 62.4154 14.088ZM67.862 8.472C67.862 8.664 67.8524 8.8944 67.8332 9.1632C67.814 9.432 67.7996 9.672 67.79 9.8832H67.8332C67.9388 9.7392 68.0828 9.552 68.2652 9.3216C68.4572 9.0816 68.6252 8.8848 68.7692 8.7312L71.1452 6.1824H72.9164L69.7916 9.5088L73.118 13.944H71.318L68.7548 10.4736L67.862 11.2224V13.944H66.35V3H67.862V8.472ZM82.5873 13.944H81.0321V9.2496H76.1217V13.944H74.5665V3.6624H76.1217V7.9248H81.0321V3.6624H82.5873V13.944ZM92.0056 10.056C92.0056 11.3424 91.6744 12.336 91.012 13.0368C90.3496 13.7376 89.4568 14.088 88.3336 14.088C87.6328 14.088 87.0088 13.9296 86.4616 13.6128C85.924 13.296 85.4968 12.84 85.18 12.2448C84.8728 11.64 84.7192 10.9104 84.7192 10.056C84.7192 8.7696 85.0456 7.7808 85.6984 7.0896C86.3512 6.3888 87.244 6.0384 88.3768 6.0384C89.0872 6.0384 89.7112 6.1968 90.2488 6.5136C90.796 6.8208 91.2232 7.272 91.5304 7.8672C91.8472 8.4624 92.0056 9.192 92.0056 10.056ZM86.2888 10.056C86.2888 10.9296 86.452 11.6112 86.7784 12.1008C87.1144 12.5904 87.6424 12.8352 88.3624 12.8352C89.0824 12.8352 89.6056 12.5904 89.932 12.1008C90.268 11.6112 90.436 10.9296 90.436 10.056C90.436 9.1728 90.268 8.496 89.932 8.0256C89.596 7.5456 89.068 7.3056 88.348 7.3056C87.628 7.3056 87.1048 7.5456 86.7784 8.0256C86.452 8.496 86.2888 9.1728 86.2888 10.056ZM100.622 6.1824V13.944H99.3982L99.1822 12.9216H99.1102C98.8606 13.3248 98.515 13.6224 98.0734 13.8144C97.6318 13.9968 97.1662 14.088 96.6766 14.088C95.7646 14.088 95.0686 13.8624 94.5886 13.4112C94.1086 12.96 93.8686 12.2448 93.8686 11.2656V6.1824H95.4094V11.0352C95.4094 12.2352 95.9326 12.8352 96.979 12.8352C97.7758 12.8352 98.3278 12.6 98.635 12.1296C98.9422 11.6592 99.0958 10.9872 99.0958 10.1136V6.1824H100.622ZM108.166 11.7552C108.166 12.5136 107.888 13.0944 107.331 13.4976C106.774 13.8912 106.001 14.088 105.013 14.088C104.465 14.088 103.995 14.0448 103.601 13.9584C103.217 13.8816 102.862 13.7664 102.536 13.6128V12.2736C102.872 12.4368 103.265 12.5856 103.717 12.72C104.177 12.8448 104.624 12.9072 105.056 12.9072C105.632 12.9072 106.045 12.816 106.294 12.6336C106.553 12.4512 106.683 12.2064 106.683 11.8992C106.683 11.7264 106.635 11.5728 106.539 11.4384C106.443 11.2944 106.261 11.1504 105.992 11.0064C105.733 10.8528 105.349 10.68 104.84 10.488C104.341 10.2864 103.918 10.0896 103.572 9.8976C103.236 9.696 102.977 9.4608 102.795 9.192C102.613 8.9136 102.521 8.5584 102.521 8.1264C102.521 7.4544 102.79 6.9408 103.328 6.5856C103.875 6.2208 104.595 6.0384 105.488 6.0384C105.958 6.0384 106.4 6.0864 106.813 6.1824C107.235 6.2784 107.643 6.4128 108.037 6.5856L107.533 7.752C107.197 7.608 106.851 7.488 106.496 7.392C106.141 7.2864 105.78 7.2336 105.416 7.2336C104.955 7.2336 104.604 7.3056 104.364 7.4496C104.124 7.5936 104.004 7.7952 104.004 8.0544C104.004 8.2368 104.062 8.3952 104.177 8.5296C104.293 8.664 104.485 8.7984 104.753 8.9328C105.032 9.0672 105.411 9.2304 105.891 9.4224C106.371 9.6048 106.779 9.792 107.115 9.984C107.461 10.176 107.72 10.4112 107.893 10.6896C108.075 10.968 108.166 11.3232 108.166 11.7552ZM113.039 6.0384C114.056 6.0384 114.858 6.3552 115.444 6.9888C116.029 7.6128 116.322 8.4672 116.322 9.552V10.3872H111.109C111.128 11.184 111.335 11.7936 111.728 12.216C112.132 12.6384 112.693 12.8496 113.413 12.8496C113.912 12.8496 114.354 12.8064 114.738 12.72C115.132 12.624 115.535 12.4848 115.948 12.3024V13.5696C115.554 13.7424 115.16 13.872 114.767 13.9584C114.373 14.0448 113.903 14.088 113.356 14.088C112.597 14.088 111.93 13.9392 111.354 13.6416C110.788 13.344 110.341 12.9024 110.015 12.3168C109.698 11.7216 109.54 10.992 109.54 10.128C109.54 9.2544 109.684 8.5152 109.972 7.9104C110.269 7.3056 110.677 6.8448 111.196 6.528C111.724 6.2016 112.338 6.0384 113.039 6.0384ZM113.039 7.2192C112.492 7.2192 112.05 7.3968 111.714 7.752C111.388 8.1072 111.196 8.6112 111.138 9.264H114.796C114.786 8.6592 114.637 8.1696 114.349 7.7952C114.071 7.4112 113.634 7.2192 113.039 7.2192Z"
fill="currentColor"
/>
<path
d="M72.3014 20.9363H71.1934C71.1508 20.6996 71.0715 20.4912 70.9555 20.3113C70.8395 20.1314 70.6975 19.9787 70.5294 19.8532C70.3613 19.7278 70.1731 19.6331 69.9648 19.5691C69.7588 19.5052 69.5398 19.4733 69.3078 19.4733C68.8888 19.4733 68.5135 19.5786 68.1821 19.7893C67.853 20 67.5926 20.309 67.4008 20.7162C67.2114 21.1233 67.1167 21.6205 67.1167 22.2076C67.1167 22.7995 67.2114 23.299 67.4008 23.7062C67.5926 24.1134 67.8542 24.4212 68.1856 24.6295C68.5171 24.8378 68.8899 24.942 69.3042 24.942C69.5339 24.942 69.7517 24.9112 69.9577 24.8497C70.166 24.7858 70.3542 24.6922 70.5223 24.5691C70.6904 24.446 70.8324 24.2957 70.9484 24.1181C71.0668 23.9382 71.1485 23.7323 71.1934 23.5002L72.3014 23.5038C72.2422 23.8613 72.1274 24.1903 71.9569 24.491C71.7889 24.7893 71.5722 25.0474 71.3071 25.2652C71.0443 25.4806 70.7436 25.6475 70.4051 25.7659C70.0666 25.8842 69.6972 25.9434 69.2971 25.9434C68.6674 25.9434 68.1063 25.7943 67.6139 25.496C67.1215 25.1953 66.7332 24.7656 66.4491 24.2069C66.1674 23.6482 66.0265 22.9818 66.0265 22.2076C66.0265 21.4311 66.1686 20.7647 66.4527 20.2083C66.7368 19.6496 67.125 19.2211 67.6175 18.9228C68.1099 18.6222 68.6698 18.4718 69.2971 18.4718C69.683 18.4718 70.0429 18.5275 70.3767 18.6387C70.7129 18.7476 71.0147 18.9086 71.2822 19.1217C71.5497 19.3324 71.7711 19.5904 71.9463 19.8958C72.1215 20.1989 72.2398 20.5457 72.3014 20.9363ZM74.591 18.5713V25.844H73.5292V18.5713H74.591ZM78.317 25.9541C77.8057 25.9541 77.3594 25.8369 76.9782 25.6025C76.5971 25.3681 76.3012 25.0403 76.0905 24.6189C75.8798 24.1975 75.7744 23.705 75.7744 23.1416C75.7744 22.5758 75.8798 22.081 76.0905 21.6572C76.3012 21.2334 76.5971 20.9044 76.9782 20.67C77.3594 20.4356 77.8057 20.3184 78.317 20.3184C78.8284 20.3184 79.2747 20.4356 79.6558 20.67C80.037 20.9044 80.3329 21.2334 80.5436 21.6572C80.7543 22.081 80.8596 22.5758 80.8596 23.1416C80.8596 23.705 80.7543 24.1975 80.5436 24.6189C80.3329 25.0403 80.037 25.3681 79.6558 25.6025C79.2747 25.8369 78.8284 25.9541 78.317 25.9541ZM78.3206 25.0627C78.652 25.0627 78.9266 24.9751 79.1444 24.8C79.3622 24.6248 79.5232 24.3916 79.6274 24.1004C79.7339 23.8092 79.7872 23.4884 79.7872 23.138C79.7872 22.79 79.7339 22.4704 79.6274 22.1792C79.5232 21.8857 79.3622 21.6501 79.1444 21.4725C78.9266 21.295 78.652 21.2062 78.3206 21.2062C77.9868 21.2062 77.7098 21.295 77.4896 21.4725C77.2718 21.6501 77.1096 21.8857 77.0031 22.1792C76.8989 22.4704 76.8469 22.79 76.8469 23.138C76.8469 23.4884 76.8989 23.8092 77.0031 24.1004C77.1096 24.3916 77.2718 24.6248 77.4896 24.8C77.7098 24.9751 77.9868 25.0627 78.3206 25.0627ZM85.5001 23.5819V20.3894H86.5654V25.844H85.5214V24.8994H85.4646C85.3391 25.1906 85.1379 25.4332 84.8609 25.6274C84.5863 25.8191 84.2442 25.915 83.8346 25.915C83.4842 25.915 83.1741 25.8381 82.9042 25.6842C82.6367 25.5279 82.426 25.2971 82.2721 24.9917C82.1206 24.6863 82.0448 24.3087 82.0448 23.8589V20.3894H83.1066V23.7311C83.1066 24.1028 83.2096 24.3987 83.4156 24.6189C83.6215 24.839 83.8891 24.9491 84.2181 24.9491C84.417 24.9491 84.6147 24.8994 84.8112 24.8C85.01 24.7005 85.1746 24.5502 85.3048 24.349C85.4374 24.1477 85.5025 23.8921 85.5001 23.5819ZM90.034 25.9505C89.5937 25.9505 89.2007 25.8381 88.855 25.6132C88.5117 25.3859 88.2419 25.0627 88.0454 24.6437C87.8512 24.2223 87.7542 23.7169 87.7542 23.1274C87.7542 22.5379 87.8524 22.0336 88.0489 21.6146C88.2478 21.1956 88.52 20.8748 88.8657 20.6522C89.2113 20.4297 89.6031 20.3184 90.0411 20.3184C90.3796 20.3184 90.6519 20.3752 90.8579 20.4889C91.0662 20.6001 91.2272 20.7304 91.3408 20.8795C91.4568 21.0287 91.5468 21.16 91.6107 21.2737H91.6746V18.5713H92.7364V25.844H91.6995V24.9953H91.6107C91.5468 25.1113 91.4545 25.2439 91.3337 25.393C91.2153 25.5421 91.052 25.6724 90.8437 25.7836C90.6353 25.8949 90.3654 25.9505 90.034 25.9505ZM90.2684 25.045C90.5738 25.045 90.8318 24.9645 91.0425 24.8035C91.2556 24.6402 91.4166 24.4141 91.5255 24.1252C91.6367 23.8364 91.6924 23.5002 91.6924 23.1167C91.6924 22.7379 91.6379 22.4065 91.529 22.1224C91.4201 21.8383 91.2603 21.617 91.0496 21.4583C90.8389 21.2997 90.5785 21.2204 90.2684 21.2204C89.9488 21.2204 89.6824 21.3033 89.4694 21.469C89.2563 21.6347 89.0953 21.8608 88.9864 22.1473C88.8799 22.4337 88.8266 22.7569 88.8266 23.1167C88.8266 23.4813 88.8811 23.8092 88.99 24.1004C89.0989 24.3916 89.2599 24.6224 89.4729 24.7929C89.6884 24.9609 89.9535 25.045 90.2684 25.045Z"
fill="currentColor"
/>
<path
d="M20.5001 0C14.0001 0 10.5001 4 8.50013 9.5C4.50013 9.5 0.000244141 14 0.500132 20C0.832239 23.9862 4.00025 28.5 9.00013 28.5H33.5001C37.0001 28.5 40.5001 25.5 40.5001 21C40.5001 16 37.0001 13 33.5001 13C33.5001 5 28.0001 0 20.5001 0Z"
fill="#F9FF69"
/>
<path
d="M20.5 0.25C24.1939 0.25 27.3789 1.48007 29.6387 3.67871C31.8973 5.87634 33.25 9.05948 33.25 13V13.25H33.5C36.8511 13.25 40.25 16.127 40.25 21C40.25 25.3619 36.8619 28.25 33.5 28.25H9C4.17148 28.2499 1.07423 23.8816 0.749023 19.9795C0.504837 17.0486 1.482 14.4876 3.00488 12.6602C4.53166 10.828 6.59092 9.75005 8.5 9.75H8.6748L8.73535 9.58496C9.7269 6.85838 11.0823 4.52586 12.9766 2.87598C14.8656 1.23067 17.3065 0.250027 20.5 0.25Z"
stroke="#151515"
stroke-opacity="0.1"
stroke-width="0.5"
/>
<path
d="M14 8.66955C14 8.57707 14.0771 8.5 14.1696 8.5H15.4643C15.5568 8.5 15.6338 8.57707 15.6338 8.66955V23.0505C15.6338 23.143 15.5568 23.22 15.4643 23.22H14.1696C14.0771 23.22 14 23.143 14 23.0505V8.66955Z"
fill="#161616"
/>
<path
d="M17.2676 8.66955C17.2676 8.57707 17.3446 8.5 17.4371 8.5H18.7319C18.8244 8.5 18.9014 8.57707 18.9014 8.66955V23.0505C18.9014 23.143 18.8244 23.22 18.7319 23.22H17.4371C17.3446 23.22 17.2676 23.143 17.2676 23.0505V8.66955Z"
fill="#161616"
/>
<path
d="M20.5352 8.66955C20.5352 8.57707 20.6122 8.5 20.7047 8.5H21.9995C22.0919 8.5 22.169 8.57707 22.169 8.66955V23.0505C22.169 23.143 22.0919 23.22 21.9995 23.22H20.7047C20.6122 23.22 20.5352 23.143 20.5352 23.0505V8.66955Z"
fill="#161616"
/>
<path
d="M23.8184 8.66955C23.8184 8.57707 23.8954 8.5 23.9879 8.5H25.2827C25.3751 8.5 25.4522 8.57707 25.4522 8.66955V23.0505C25.4522 23.143 25.3751 23.22 25.2827 23.22H23.9879C23.8954 23.22 23.8184 23.143 23.8184 23.0505V8.66955Z"
fill="#161616"
/>
<path
d="M27.0859 14.4034C27.0859 14.311 27.163 14.2339 27.2555 14.2339H28.5502C28.6427 14.2339 28.7198 14.311 28.7198 14.4034V17.332C28.7198 17.4245 28.6427 17.5016 28.5502 17.5016H27.2555C27.163 17.5016 27.0859 17.4245 27.0859 17.332V14.4034Z"
fill="#161616"
/>
</svg>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import File from "../File.svelte";
</script>

<div class="flex flex-col text-fg-primary">
<div class="flex flex-col items-center text-fg-primary">
<File size="24px" />
<div class="text-xs font-bold leading-tight">Local file</div>
</div>
30 changes: 30 additions & 0 deletions web-common/src/components/icons/connectors/SalesforceIcon.svelte

Large diffs are not rendered by default.

82 changes: 44 additions & 38 deletions web-common/src/features/connectors/code-utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { QueryClient } from "@tanstack/svelte-query";
import { get } from "svelte/store";
import {
ConnectorDriverPropertyType,
type V1ConnectorDriver,
type ConnectorDriverProperty,
getRuntimeServiceGetFileQueryKey,
Expand All @@ -27,54 +26,59 @@ import {
makeSufficientlyQualifiedTableName,
} from "./connectors-utils";

const YAML_MODEL_TEMPLATE = `type: model
materialize: true\n
connector: {{ connector }}\n
function yamlModelTemplate(driverName: string) {
return `# Model YAML
# Reference documentation: https://docs.rilldata.com/developers/build/connectors/data-source/${driverName}

type: model
materialize: true

connector: {{ connector }}

sql: {{ sql }}{{ dev_section }}
`;
}

export function compileConnectorYAML(
connector: V1ConnectorDriver,
formValues: Record<string, unknown>,
options?: {
fieldFilter?: (property: ConnectorDriverProperty) => boolean;
orderedProperties?: ConnectorDriverProperty[];
fieldFilter?: (
property:
| ConnectorDriverProperty
| { key?: string; type?: string; secret?: boolean; internal?: boolean },
) => boolean;
orderedProperties?: Array<
| ConnectorDriverProperty
| { key?: string; type?: string; secret?: boolean }
>;
connectorInstanceName?: string;
secretKeys?: string[];
stringKeys?: string[];
},
) {
// Add instructions to the top of the file
const driverName = getDriverNameForConnector(connector.name as string);
const topOfFile = `# Connector YAML
# Reference documentation: https://docs.rilldata.com/reference/project-files/connectors
# Reference documentation: https://docs.rilldata.com/developers/build/connectors/data-source/${driverName}

type: connector

driver: ${getDriverNameForConnector(connector.name as string)}`;
driver: ${driverName}`;

// Use the provided orderedProperties if available, otherwise fall back to configProperties/sourceProperties
let properties =
options?.orderedProperties ??
connector.configProperties ??
connector.sourceProperties ??
[];
// Use the provided orderedProperties if available.
let properties = options?.orderedProperties ?? [];

// Optionally filter properties
if (options?.fieldFilter) {
properties = properties.filter(options.fieldFilter);
}

// Get the secret property keys
const secretPropertyKeys =
connector.configProperties
?.filter((property) => property.secret)
.map((property) => property.key) || [];
const secretPropertyKeys = options?.secretKeys ?? [];

// Get the string property keys
const stringPropertyKeys =
connector.configProperties
?.filter(
(property) => property.type === ConnectorDriverPropertyType.TYPE_STRING,
)
.map((property) => property.key) || [];
const stringPropertyKeys = options?.stringKeys ?? [];

// Compile key value pairs in the order of properties
const compiledKeyValues = properties
Expand All @@ -100,11 +104,12 @@ driver: ${getDriverNameForConnector(connector.name as string)}`;

const isSecretProperty = secretPropertyKeys.includes(key);
if (isSecretProperty) {
return `${key}: "{{ .env.${makeDotEnvConnectorKey(
const placeholder = `{{ .env.${makeDotEnvConnectorKey(
connector.name as string,
key,
options?.connectorInstanceName,
)} }}"`;
)} }}`;
return `${key}: "${placeholder}"`;
}

const isStringProperty = stringPropertyKeys.includes(key);
Expand All @@ -126,10 +131,17 @@ export async function updateDotEnvWithSecrets(
formValues: Record<string, unknown>,
formType: "source" | "connector",
connectorInstanceName?: string,
opts?: { secretKeys?: string[] },
): Promise<string> {
const instanceId = get(runtime).instanceId;

// Get the existing .env file
// Invalidate the cache to ensure we get fresh .env content
// This prevents overwriting credentials added by a previous step
await queryClient.invalidateQueries({
queryKey: getRuntimeServiceGetFileQueryKey(instanceId, { path: ".env" }),
});

// Get the existing .env file with fresh data
let blob: string;
try {
const file = await queryClient.fetchQuery({
Expand All @@ -147,13 +159,7 @@ export async function updateDotEnvWithSecrets(
}

// Get the secret keys
const properties =
formType === "source"
? connector.sourceProperties
: connector.configProperties;
const secretKeys = properties
?.filter((property) => property.secret)
.map((property) => property.key);
const secretKeys = opts?.secretKeys ?? [];

// In reality, all connectors have secret keys, but this is a safeguard
if (!secretKeys) {
Expand Down Expand Up @@ -321,7 +327,8 @@ export async function createYamlModelFromTable(
? `\n\ndev:\n sql: ${selectStatement} limit 10000`
: "";

const yamlContent = YAML_MODEL_TEMPLATE.replace("{{ connector }}", connector)
const yamlContent = yamlModelTemplate(driverName)
.replace("{{ connector }}", connector)
.replace(/{{ sql }}/g, selectStatement)
.replace("{{ dev_section }}", devSection);

Expand Down Expand Up @@ -399,8 +406,7 @@ export async function createSqlModelFromTable(
);

// Create model
const topComments =
"-- Model SQL\n-- Reference documentation: https://docs.rilldata.com/build/models";
const topComments = `-- Model SQL\n-- Reference documentation: https://docs.rilldata.com/developers/build/connectors/data-source/${driverName}`;
const connectorLine = `-- @connector: ${connector}`;
const selectStatement = isNonStandardIdentifier(
sufficientlyQualifiedTableName,
Expand Down
Loading
Loading