https://supabase.com/ logo
Join Discord
Powered by
# help
  • l

    letourpowerscombine

    10/22/2021, 8:46 AM
    I'm trying to create a new Supabase table by importing a large CSV (70,000 rows), in order to access the CSV via an api. After the create table process and the confirmation that the table will be created with 70,000 rows, the table is created with 0 rows. Is what I'm trying to do possible? Is there a better approach? I would like to query the large CSV (20 MB) without having to include it in my website build, as sessions would probably only query a few rows at a time
  • t

    Tito

    10/22/2021, 2:58 PM
    Hi Guys! I have created a self-hosted supabase on an Intel NUC here in my home environment and when I try to run a sample app seems that I am receiving a "CORS" error. After the first setup do I need to authorize anything on Kong?
  • t

    Tito

    10/22/2021, 3:55 PM
    Copy code
    OPTIONS
        http://192.168.1.12/auth/v1/signup
    Status
    403
    Forbidden
    VersionHTTP/1.1
    Transferred123 B (0 B size)
    Referrer Policystrict-origin-when-cross-origin
  • t

    Tito

    10/22/2021, 6:54 PM
    solved, I needed to add :8000 for kong
  • j

    jonny

    10/22/2021, 7:29 PM
    Could you open a support ticket through the dashboard? https://app.supabase.io/support/new
  • b

    BBB

    10/22/2021, 8:27 PM
    there is an option to save session in supabase?
    s
    • 2
    • 2
  • s

    silentworks

    10/22/2021, 9:16 PM
    Save session in Supabase
  • h

    HarryET

    10/22/2021, 11:10 PM
    Hey! My realtime dosen't ream to work with views. Is this intended? or is It supposed to be sending realtime data for views?
  • h

    HarryET

    10/23/2021, 9:53 AM
    Also another question, can you do case-insensitive queries with the SDK?
  • g

    garyaustin

    10/23/2021, 2:25 PM
    You can use ilike, use the CITEXT extension to create a ci column or a computed column to lower case as some options
  • h

    HarryET

    10/23/2021, 2:25 PM
    I found a solution in the end 🙂 but thanks anyways
  • b

    BBB

    10/23/2021, 2:53 PM
    hey, there is an option so save ur jwt in cookie and not in local storage?
  • l

    larryM

    10/23/2021, 3:52 PM
    When using the subscribe for realtime data, is it possible to retrieve not only the updates, but the current documents that match the subscription as well?
  • y

    YelloJello

    10/23/2021, 5:42 PM
    Views are not tables, replication doesn't affect them. When there is a change in the view, the db just executes the query that was used to create the view.
  • h

    HarryET

    10/23/2021, 5:42 PM
    Oh! Is there no way to use realtime on a view then?
  • y

    YelloJello

    10/23/2021, 5:42 PM
    Nope, what are you trying to do though?
  • y

    YelloJello

    10/23/2021, 5:47 PM
    Not exactly clear what you mean by "current documents that match the subscription". If you mean is it possible to get some data based on the updated data then not as part of the payload returned by the subscription, you'll have to query the database a second time. If you mean is it possible to get the entire row of data that the updated occurred on, that's default behavior afaik
  • l

    larryM

    10/23/2021, 5:58 PM
    thanks! So im just looking for a method similar to Firebase's onSnapshot where you can have a query that returns the initial rows that meet the query and listen to changes to those specific rows
  • y

    YelloJello

    10/23/2021, 6:07 PM
    When you register a subscription it doesn't return a set of initial data, you have to fetch it separately, and the subscriber will stream changes from the point you registered the subscriber
  • s

    Señor Bruno

    10/23/2021, 6:27 PM
    Which client caching solution do guys use for your project (since all the backend is stored in the cloud). Right now I am using the localStorage for the userprofile data, but I have a feeling it should not be like that.
  • g

    garyaustin

    10/23/2021, 6:36 PM
    I'm using js localForage (which for the most part uses indexedDB). I have to support minimal offline activity (write notes) and use this to also cache read notes and store any file/image data waiting to be written if offline.
  • w

    wachira

    10/24/2021, 12:44 AM
    Hi so I am currently working on authentication through Magic Link with Supabase and something weird is happening. The project is built with Next JS This is the login function
    Copy code
    javascript
    async function signIn() {
        const { error, data } = await supabase.auth.signIn(
          {
            email,
          },
          {
            redirectTo: "http://localhost:3000/verify",
          }
        );
        if (error) {
          console.log({ error });
        } else {
          setSubmitted(true);
        }
    }
    The email is sent out successfully but I have a problem with the redirect link, somehow supabase is adding a
    #
    to the url, so am getting
    http://localhost:3000/verify#access_token=<ACCESS_TOKEN>&expires_in=3600&refresh_token=<REFRESH_TOKEN>&token_type=bearer&type=magiclink
    instead of
    http://localhost:3000/verify?access_token=<ACCESS_TOKEN>&expires_in=3600&refresh_token=<REFRESH_TOKEN>&token_type=bearer&type=magiclink
    s
    p
    • 3
    • 15
  • s

    silentworks

    10/24/2021, 12:56 AM
    Supabase Magic Link
  • p

    Psymin

    10/24/2021, 6:11 AM
    in the Authentication settings page, in the site URL field, is it okay to enter more than 1 URL (using a comma-separated list)? (screenshot attached)...
  • h

    HarryET

    10/24/2021, 9:10 AM
    Hey! I have this plpsql function but when it gets run it stops the insert with this message:
    Copy code
    sql
    CREATE OR REPLACE FUNCTION
        public.message_insert_bot_trigger_fnc()
        RETURNS TRIGGER AS
    $$
    DECLARE
        bot               bot_members%rowtype;
        bot_http_response http_response;
    BEGIN
        FOR bot IN
            SELECT *
            FROM bot_members as member
            WHERE member.chat_id = NEW.chat_id
              AND member.interactions_url IS NOT NULL
        LOOP
            SELECT *
            INTO bot_http_response
            FROM http((
                       'POST',
                       bot.interactions_url,
                       ARRAY [http_header('X-Version'::varchar, 'v1'::varchar), http_header('X-Bot-ID'::varchar, bot.id::varchar)],
                       '{"type": 1,"data": {"id": "' || NEW.id::varchar || '","content": "' || NEW.content || '","user_id": "' || NEW.user_id::varchar || '","chat_id": "' || NEW.chat_id::varchar || '"}}',
                       'application/json'
                )::http_request);
            -- Do something with returned data!
        END LOOP;
        RETURN NEW;
    END;
    $$ LANGUAGE plpgsql SECURITY DEFINER;
  • h

    HarryET

    10/24/2021, 9:10 AM
    Copy code
    {
      "hint": null,
      "message": "control reached end of trigger procedure without RETURN",
      "code": "2F005",
      "details": null
    }
  • h

    HarryET

    10/24/2021, 9:10 AM
    Any help would be apreciated. I've probably just done somthing stupid haha Edit: Fixed 🙂
  • v

    VuNguyen

    10/24/2021, 1:01 PM
    Hello, I just take a look at this discussion here: https://github.com/supabase/supabase/discussions/710#discussioncomment-362651 Let say I have
    movies
    table, if I want to have a column that has an array of other movies foreign key, I have to create another table, I'll name it
    relations
    . Now, If I want to query a movie from
    movies
    table, also all it's relations. What should I do? I assume I have to make two calls
    Copy code
    js
    let { data: movie, error } = await supabase
      .from('anime')
      .select('*')
    
    let {data: relation, error } = await supabase
      .from("relations")
      .eq("movie_id", movie.id)
      .select("*")
    
    // Is this a right way to do it?
    Thank you
  • k

    kresimirgalic

    10/24/2021, 7:55 PM
    Hey, does anyone know how to filter data per dates, for example i want to filter past events or future events from today...
  • k

    kawallis

    10/24/2021, 9:53 PM
    Has anyone added Instagram as a oauth provider curious how one could do it ?
1...114115116...316Latest