Pobierz dane z DuckDB plik do Arkusze Google
Otwórz bazę danych DuckDB w Arkuszach Google i odświeżaj ją, kiedy tylko chcesz. Bez przesyłania plików CSV, bez skryptów aplikacji, bez kopiowania i wklejania. Za pierwszym razem zajmie to około dziesięciu minut, a plan darmowy to obejmuje.
Co z tego wyjdzie?
Arkusz Google pokazujący na żywo wyniki zapytania SQL do pliku DuckDB, z przyciskiem pobierającym najnowsze wiersze po każdej zmianie danych. Na przykład:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | customer_id | imię | nazwisko | kraj | całkowity |
| 2 | 1042 | Maria | Álvarez | USA | 1,284.50 |
| 3 | 1043 | Daniel | Okafor | USA | 612.00 |
| 4 | 1047 | Priya | Nair | USA | 2,090.75 |
| 5 | 1051 | Tomasz | Góra | USA | 338.20 |
| 6 | 1056 | Lucía | Ferreira | USA | 1,455.00 |
| 7 | 1060 | Kenji | Sato | USA | 874.10 |
| 8 |
Bazy danych DuckDB to pojedyncze pliki, zwykle kończące się na .duckdbArkusze Google w ogóle ich nie otwierają, a standardowym rozwiązaniem jest eksport pliku CSV i ponowne przesyłanie go po każdej zmianie danych. Query Streams pomija ten problem: mały program pomocniczy odczytuje plik w miejscu, w którym się on znajduje, a dodatek do Arkuszy Google pyta go o żądane wiersze. Nie muszą one znajdować się na tym samym komputerze. Plik może znajdować się na komputerze w biurze, a Ty możesz być w dowolnym miejscu: w dowolnej przeglądarce na dowolnym urządzeniu.
Czego będziesz potrzebować
Konto Query Streams
Plan darmowy wystarczy do tego poradnika. Zarejestruj się na my.querystreams.com.
The Agent on a computer that can open the file
Mały program, który działa w tle i odczytuje plik, gdy Arkusze Google o to proszą. Krok 2 poniżej pokazuje, gdzie go znaleźć.
Twój plik DuckDB
Na przykład wiedzieć, gdzie to jest C:\Dane\sales.duckdb lub \\server\share\sales.duckdb. If it lives in OneDrive, Dropbox or Google Drive, make sure it is synced to the Agent’s computer.
Który komputer ma Agenta? The one where the file is, or one that can open it from a network share (see Reaching a file on a network share below). That computer needs to stay on. Arkusze Google mogą być dostępne wszędzie:działa w Twojej przeglądarce, więc nic nie jest instalowane w miejscu, w którym odczytujesz dane.
Podłącz w pięciu krokach
-
Utwórz swoje konto
Przejdź do my.querystreams.com i zarejestruj się. Wybierz Bezpłatny plan. To prawdziwy plan, a nie wersja próbna, obejmujący podłączenie pliku DuckDB i uruchamianie zapytań z Arkuszy Google.
Install the Agent on a computer that can open the file



Zaloguj się, otwórz Pobierać, and install the Agent for your system on the computer where the file is, or on one that can open it from a network share. It takes a minute and starts on its own from then on.
Dlaczego mały program, a nie sterownik? The Agent is one install for Windows, Mac or Linux (about 85 MB on Windows, a little over 100 MB on Mac and Linux) that runs quietly in the background. It makes one outbound, encrypted connection to Query Streams, the same way a browser does, so you open no firewall port and set up no VPN. The file stays where it is, and the rows travel to wherever you are, across the internet if need be. The only thing on your side is the add-on.
Strona pobierania pokazuje Twój klucz dostępuWklej to do agenta, gdy o to poprosi i poczekaj, aż odznaka zostanie odczytana Połączono ze strumieniami zapytańTo jest jedyna rzecz, którą robisz na samym Agencie.
Pełne opisy przejść, jeśli ich potrzebujesz: Okna, Prochowiec, Linux.
-
Skieruj go na swój plik DuckDB
Wróć do przeglądarki i otwórz Agenci danych (pod Dane (w górnym menu). Twój agent jest tam wymieniony. Kliknij Dodaj złącze, wybierać DuckDBi wypełnij:
- Nazwa połączenia
- Jakąkolwiek nazwę, którą później rozpoznasz, np. Baza danych sprzedaży.
- Ścieżka pliku bazy danych
- Where the DuckDB file (.duckdb or .db) is: a path on the Agent’s computer, or a network path, like \\server\share\folder\sales.duckdb, never a mapped drive letter such as S:. Use Browse to pick it.
Kliknij Połączenie testowe. Kiedy to czyta Połączony, kliknij ZapiszPołączenie zostanie nawiązane z Twoim agentem w ciągu kilku sekund.
Test nieudany? Usually the path has a typo, or it uses a mapped drive letter such as S:, which the Agent cannot see. Open the folder, copy the path from the address bar, and paste it in again. For a file on another computer, see Reaching a file on a network share poniżej.
-
See your data in Query Builder Fakultatywny
You can look at your DuckDB file before Google Sheets is involved at all. Open Kreator zapytań in the portal and pick the connection you just made. The Schemat tab lists your tables and columns, and clicking one puts its name in the editor, so you can write a query without remembering exact names. Click Bieg and the rows appear under Wyniki. Query Builder is on every plan, Free included.
On Business plans you can also ask Nova in plain English (“show me customers in the USA”) and it writes the SQL for you. When the query looks right, save it: from Personal Core up it shows in the add-on’s Saved Queries list, and on any plan you can copy the SQL into the next step.
-
Dodawanie strumieni zapytań do Arkuszy Google
Otwórz dowolną Arkusz Google i przejdź do Rozszerzenia → Dodatki → Pobierz dodatki, wyszukaj Strumienie zapytańi kliknij Zainstaluj. Lub zainstaluj go bezpośrednio z Strumienie zapytań w sklepie Google WorkspaceGoogle poprosi Cię o zezwolenie na instalację dodatku, jest to normalne.
Następnie jest on dostępny w każdym otwartym Arkuszu Google: ikona strumieni zapytań w panelu bocznym po prawej stronie, również wymieniona pod RozszerzeniaNie ma osobnego logowania. Rozpoznaje konto Google, którego już używasz, więc adres e-mail musi być adresem przypisanym do Twojego konta Query Streams.
-
Przyciągnij swój pierwszy stolik
Kliknij ikonę Strumienie zapytań w panelu bocznym po prawej stronie arkusza (lub znajdź ją pod Rozszerzenia). Wybierać Streamer zapytań i wybierz połączenie, które właśnie utworzyłeś.
Wpisz zapytanie, które chcesz uruchomić. To zapytanie pobiera kilka kolumn z zamówienia tabela:
Przykład · SQLWYBIERZ order_id, customer_name, order_total Z main.orders ZAMÓW WEDŁUG order_total OPIS LIMIT 100;
Pod Arkusz docelowy wybierz zakładkę, na której mają znaleźć się wiersze, a następnie kliknij Uruchom zapytanieWiersze trafiają na tę kartę w ciągu sekundy lub dwóch. Kliknij ponownie „Uruchom zapytanie” za każdym razem, gdy dane ulegną zmianie, a karta zostanie zaktualizowana.
Nie znasz SQL? Build it in Kreator zapytań first and paste it here, or pick it from Saved Queries if you saved it.
Reaching a file on a network share
The Agent opens files as a background service, not as you, so a file on another computer needs one extra step. Which step depends on the computer the Agent runs on.
If the test cannot get to the share, look for these words in its result: unreachable means the Agent’s computer got no answer from the server. On Linux or a Mac, not mounted means the share still has to be mounted, and that message includes the exact mount command for your server.
DuckDB file on a share? DuckDB allows one writer at a time, so the Agent cannot open a file that another program has open for writing; on a \\serwer\udział path the test says it is open for writing by another program. Close it there, or point the connector at a file nobody is writing to. Every query reads the file across the network, so a large file answers more slowly than it would from a local disk.
Test failed on a share?
A Windows Agent signs in to the file server itself, so its test result can also say:
| Wiadomość | Przyczyna | Naprawić |
|---|---|---|
| Access denied for the agent’s service account under the path, or Odmowa dostępu in the test result | The share lets in named people only, and the Agent’s own Windows account is not one of them. Or the login stored for that server may not read this share. | Kliknij Service identity under the path and store a login that can read the share. If one is stored already, ask whoever runs the server to give that account read access. |
| the credentials were refused | The server turned the stored login down: a typo, the wrong domain, or a password changed since it was saved. | Click the account name under the path and type the login again; for an account made on the server itself, leave Domain blank. were refused moments ago means the Agent waits a minute before it tries that same login again, so the account is not locked out; saving a corrected password tries again straight away. |
| Another connector on this agent already signs in to, lub Windows already holds a sign-in to | This Windows computer already signs in to that server as a different account, through another connector or another program. Windows allows one account per server. | Store the login the other connector uses, or change it on every connector that reads that server. After Windows already holds a sign-in, the rest of the message says which account it is and what to do. |
| This agent build cannot sign in to | The Agent is an older version that cannot use stored share logins. | Update the Agent, then test again. |
To wszystko. Twoje dane znajdują się w arkuszu i są aktualizowane jednym kliknięciem. Nic nie opuściło Twojej sieci poza wierszami, o które prosiłeś.
Dobre następne ruchy
- Zapisz zapytanie w portalu, dzięki czemu możesz go ponownie uruchomić jednym kliknięciem z Arkuszy Google lub Excela.
- Dodaj filtr np. zakres dat, dzięki czemu na to samo zapytanie można odpowiedzieć „w tym miesiącu” bez konieczności edycji.
- Udostępnij wyniki z kolegą. Widzą wiersze, a nie Twój plik i ścieżkę do niego.
Pytania, które zadają ludzie
Czy plik DuckDB musi znajdować się na komputerze, na którym korzystam z Arkuszy?
No. Only the Agent has to be able to open your DuckDB file. Google Sheets runs in your browser on any device. Open the add-on with the same Google account and your connections are there.
Czy mój plik bazy danych zostanie gdzieś przesłany?
No. The Agent reads the file where it sits and sends only the rows your query asks for. The file stays where it is.
Czy plik może znajdować się w usłudze OneDrive, Dropbox lub Google Drive?
Tak, pod warunkiem, że jest zsynchronizowany z komputerem, na którym działa Agent, aby Agent widział go jako zwykły plik lokalny. Skieruj połączenie na zsynchronizowaną kopię.
Czy plan darmowy naprawdę to obejmuje?
Tak. Darmowy plan to taki, który możesz zachować, a nie okres próbny, który wygasa. Sprawdź dokładnie, co obejmuje. strona z cenami.
Czy arkusz odświeża się sam?
Kliknij ponownie „Uruchom zapytanie”, gdy chcesz uzyskać najnowsze wiersze. Aby arkusz odświeżał się zgodnie z harmonogramem, bez konieczności naciskania klawiszy, skonfiguruj automatyzację w portalu Strumienie zapytań (Strumienie → Automatyzacja). Jest ona dostępna w każdym planie.
Powiązane przewodniki
Każdy przewodnik dla DuckDB
Nie jest to dokładnie to, czego szukasz?
- Masz folder z plikami Parquet zamiast pliku bazy danych DuckDB? Parquet Folder odczyta je wszystkie jako jedną tabelę → Parquet Folder
Setup trouble?
- Agent says the file or folder does not exist, or access is denied? Mapped drives, network shares, OneDrive and Linux home folders each need one fix → Where the Agent can read files from
- Agent shows Offline, or Test connection and Browse are greyed out? Check that the Agent is online → Is the Agent online?

